auth/app_settings_queries.ts

App settings database queries.

Single-row table queries for global app configuration.

Declarations
#

3 declarations

view source

query_app_settings_load
#

query_app_settings_load_with_username
#

auth/app_settings_queries.ts view source

(deps: QueryDeps): Promise<{ open_signup: boolean; updated_at: string | null; updated_by: string | null; updated_by_username: string | null; }>

Load the current app settings with resolved updater username.

deps

query dependencies

returns

Promise<{ open_signup: boolean; updated_at: string | null; updated_by: string | null; updated_by_username: string | null; }>

the app settings with updated_by_username

query_app_settings_update
#

auth/app_settings_queries.ts view source

(deps: QueryDeps, open_signup: boolean, actor_id: string): Promise<AppSettings>

Update app settings and return the updated row.

deps

query dependencies

open_signup

new value for the open_signup toggle

type boolean

actor_id

the actor making the change

type string

returns

Promise<AppSettings>

the updated app settings row

Imported by
#