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

@ -45,6 +45,9 @@ func (s *ConfigStore) Set(ctx context.Context, cur, new database.Config) (databa
if cur.InternalApplication != new.InternalApplication {
q = sqlf.Sprintf("%v internal_application = %v,", q, new.InternalApplication)
}
if cur.PostCharacterLimit != new.PostCharacterLimit {
q = sqlf.Sprintf("%v post_character_limit = %v,", q, new.PostCharacterLimit)
}
q = sqlf.Sprintf("%v id = %v WHERE id = %v RETURNING *", q, cur.ID, cur.ID)
return Get[database.Config](ctx, s.q, q)