diff options
| author | 2025-03-17 15:06:17 +0100 | |
|---|---|---|
| committer | 2025-03-17 14:06:17 +0000 | |
| commit | d5847e2d2b68a1eb41d43be170cd4ddff9003cff (patch) | |
| tree | 7352e79110b081eb72d483358f5c07c8d34c29ff /internal/db/bundb/admin.go | |
| parent | [feature/frontend] Add visibility icon for posts (#3908) (diff) | |
| download | gotosocial-d5847e2d2b68a1eb41d43be170cd4ddff9003cff.tar.xz | |
[feature] Application creation + management via API + settings panel (#3906)
* [feature] Application creation + management via API + settings panel
* fix docs links
* add errnorows test
* use known application as shorter
* add comment about side effects
Diffstat (limited to 'internal/db/bundb/admin.go')
| -rw-r--r-- | internal/db/bundb/admin.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/internal/db/bundb/admin.go b/internal/db/bundb/admin.go index a311d2fc5..02f10f44f 100644 --- a/internal/db/bundb/admin.go +++ b/internal/db/bundb/admin.go @@ -194,6 +194,17 @@ func (a *adminDB) NewSignup(ctx context.Context, newSignup gtsmodel.NewSignup) ( return nil, err } + // If no app ID was set, + // use the instance app ID. + if newSignup.AppID == "" { + instanceApp, err := a.state.DB.GetInstanceApplication(ctx) + if err != nil { + err := gtserror.Newf("db error getting instance app: %w", err) + return nil, err + } + newSignup.AppID = instanceApp.ID + } + user = >smodel.User{ ID: newUserID, AccountID: account.ID, |
