Implement server-side push notifications with scheduler and always-remind option

This commit is contained in:
Gemini Agent
2026-01-25 03:14:04 +00:00
parent ad8b45ee1f
commit 90f54766a5
17 changed files with 2429 additions and 21 deletions

View File

@@ -15,6 +15,7 @@ export async function GET() {
.select({
reminderEnabled: schema.users.reminderEnabled,
reminderTime: schema.users.reminderTime,
reminderAlways: schema.users.reminderAlways,
llmProvider: schema.users.llmProvider,
llmApiKey: schema.users.llmApiKey,
llmModel: schema.users.llmModel,
@@ -30,6 +31,7 @@ export async function GET() {
return NextResponse.json({
reminderEnabled: users[0].reminderEnabled === 1,
reminderTime: users[0].reminderTime || "20:00",
reminderAlways: users[0].reminderAlways === 1,
llmProvider: users[0].llmProvider || null,
hasLlmKey: Boolean(users[0].llmApiKey),
llmModel: users[0].llmModel || null,
@@ -55,6 +57,10 @@ export async function PATCH(request: NextRequest) {
updates.reminderEnabled = body.reminderEnabled ? 1 : 0;
}
if (typeof body.reminderAlways === "boolean") {
updates.reminderAlways = body.reminderAlways ? 1 : 0;
}
if (typeof body.reminderTime === "string") {
updates.reminderTime = body.reminderTime;
}