diff options
| -rw-r--r-- | src/db/schema.ts | 5 | ||||
| -rw-r--r-- | src/routes/parent.ts | 4 | ||||
| -rw-r--r-- | test/database.test.ts | 1 | ||||
| -rw-r--r-- | test/parent-routes.test.ts | 2 |
4 files changed, 5 insertions, 7 deletions
diff --git a/src/db/schema.ts b/src/db/schema.ts index 4e89484..ed2e36b 100644 --- a/src/db/schema.ts +++ b/src/db/schema.ts @@ -1,6 +1,8 @@ -import { integer, pgTable, varchar, boolean, text } from "drizzle-orm/pg-core"; +import { integer, pgTable, varchar, boolean, text, pgEnum } from "drizzle-orm/pg-core"; import { defineRelations, sql } from "drizzle-orm"; +export const galleryScanningMode = pgEnum("galleryScanningMode", ["delete", "notify", "none"]); + /** Parent user accounts with email auth and push notification tokens */ export const users = pgTable("users", { id: integer().primaryKey().generatedAlwaysAsIdentity(), @@ -32,7 +34,6 @@ export const deviceConfig = pgTable("deviceConfig", { familyLinkAntiCircumvention: boolean("family_link_anti_circumvention") .notNull() .default(false), - newContactAlerts: boolean("new_contact_alerts").notNull().default(true), blockStrangers: boolean("block_strangers").notNull().default(false), notifyDangerousMessages: boolean("notify_dangerous_messages") .notNull() diff --git a/src/routes/parent.ts b/src/routes/parent.ts index db7206d..dd94d6e 100644 --- a/src/routes/parent.ts +++ b/src/routes/parent.ts @@ -338,7 +338,7 @@ function createParentRouter( key: "new_people", title: "New contact alerts", description: "Get notified when your child chats with someone new.", - defaultValue: cfg.newContactAlerts, + defaultValue: cfg.notifyNewContactAdded, }, { key: "block_strangers", @@ -406,7 +406,7 @@ function createParentRouter( const keyMap: Record<string, keyof typeof deviceConfig.$inferSelect> = { disable_buddy: "disableBuddy", adult_sites: "blockAdultSites", - new_people: "newContactAlerts", + new_people: "notifyNewContactAdded", block_strangers: "blockStrangers", notify_dangerous_messages: "notifyDangerousMessages", notify_new_contact_added: "notifyNewContactAdded", diff --git a/test/database.test.ts b/test/database.test.ts index d0a76c7..20cfddb 100644 --- a/test/database.test.ts +++ b/test/database.test.ts @@ -48,7 +48,6 @@ describe("Database Operations", () => { disableBuddy: false, blockAdultSites: true, familyLinkAntiCircumvention: true, - newContactAlerts: true, blockStrangers: false, notifyDangerousMessages: true, notifyNewContactAdded: true, diff --git a/test/parent-routes.test.ts b/test/parent-routes.test.ts index 816bbbc..b93e85d 100644 --- a/test/parent-routes.test.ts +++ b/test/parent-routes.test.ts @@ -43,7 +43,6 @@ describe("Parent Routes", () => { disableBuddy: false, blockAdultSites: true, familyLinkAntiCircumvention: false, - newContactAlerts: true, blockStrangers: false, notifyDangerousMessages: true, notifyNewContactAdded: true, @@ -65,7 +64,6 @@ describe("Parent Routes", () => { disableBuddy: false, blockAdultSites: true, familyLinkAntiCircumvention: false, - newContactAlerts: true, blockStrangers: false, notifyDangerousMessages: true, notifyNewContactAdded: true, |