diff options
| author | 2024-07-31 16:03:34 +0200 | |
|---|---|---|
| committer | 2024-07-31 15:03:34 +0100 | |
| commit | 38f041cea1ba0cd3492f351353a29aa5b73e2731 (patch) | |
| tree | bdd055d5cf7d9c06523c694cb4abe86d220960d0 /internal/db/bundb/list.go | |
| parent | [feature] Object store custom URL (S3) (#3046) (diff) | |
| download | gotosocial-38f041cea1ba0cd3492f351353a29aa5b73e2731.tar.xz | |
[feature] Allow users to export data via the settings panel (#3140)
* [feature] Allow users to export data via the settings panel
* rename/move some stuff
Diffstat (limited to 'internal/db/bundb/list.go')
| -rw-r--r-- | internal/db/bundb/list.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/db/bundb/list.go b/internal/db/bundb/list.go index b8391ff6d..937257ef0 100644 --- a/internal/db/bundb/list.go +++ b/internal/db/bundb/list.go @@ -106,6 +106,14 @@ func (l *listDB) GetListsForAccountID(ctx context.Context, accountID string) ([] return l.GetListsByIDs(ctx, listIDs) } +func (l *listDB) CountListsForAccountID(ctx context.Context, accountID string) (int, error) { + return l.db. + NewSelect(). + Table("lists"). + Where("? = ?", bun.Ident("account_id"), accountID). + Count(ctx) +} + func (l *listDB) PopulateList(ctx context.Context, list *gtsmodel.List) error { var ( err error |
