add a couple post endpoints + /timelines/home

This commit is contained in:
sam 2023-09-06 16:32:33 +02:00
parent dd72a1f4c1
commit 9f052dc9ef
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
24 changed files with 462 additions and 32 deletions

View file

@ -94,6 +94,13 @@ func (a *App) Post(q ...sql.Querier) *sql.PostStore {
return sql.NewPostStore(q[0])
}
func (a *App) Timeline(q ...sql.Querier) *sql.TimelineStore {
if len(q) == 0 || q[0] == nil {
return sql.NewTimelineStore(a.Database.PoolQuerier())
}
return sql.NewTimelineStore(q[0])
}
func (a *App) Token(q ...sql.Querier) *sql.TokenStore {
if len(q) == 0 || q[0] == nil {
return sql.NewTokenStore(a.Database.PoolQuerier())