User CRUD on backend and refactors
This commit is contained in:
@@ -4,11 +4,6 @@ import { constant } from "effect/Function";
|
||||
/* NOTE I know "effect/Config" exists, but I also don't care. This works for me. */
|
||||
|
||||
export const Config = Schema.Struct({
|
||||
CLIENT_ID: Schema.UUID,
|
||||
CLIENT_SECRET: pipe(
|
||||
Schema.String,
|
||||
Schema.Redacted,
|
||||
),
|
||||
DB_PATH: pipe(
|
||||
Schema.String,
|
||||
Schema.optionalWith({ default: constant("db.sqlite3") }),
|
||||
@@ -22,8 +17,25 @@ export const Config = Schema.Struct({
|
||||
Schema.NumberFromString,
|
||||
Schema.optionalWith({ default: constant(3000) }),
|
||||
),
|
||||
OAUTH_CLIENT_ID: Schema.String,
|
||||
OAUTH_CLIENT_SECRET: pipe(
|
||||
Schema.String,
|
||||
Schema.Redacted,
|
||||
),
|
||||
OAUTH_AUTHORIZATION_ENDPOINT: Schema.String,
|
||||
OAUTH_TOKEN_ENDPOINT: Schema.String,
|
||||
OAUTH_USER_ID_CLAIM: pipe(
|
||||
Schema.String,
|
||||
Schema.optionalWith({ default: constant("sub") }),
|
||||
),
|
||||
OAUTH_DISPLAY_NAME_CLAIM: pipe(
|
||||
Schema.String,
|
||||
Schema.optionalWith({ default: constant("display_name") }),
|
||||
),
|
||||
OAUTH_AVATAR_URL_CLAIM: pipe(
|
||||
Schema.String,
|
||||
Schema.optionalWith({ default: constant("picture") }),
|
||||
),
|
||||
});
|
||||
|
||||
export type Config = typeof Config.Type;
|
||||
|
||||
Reference in New Issue
Block a user