refactor(rubgram): replace archive/round/slip system with deleted+submit_day columns and month-calendar
- drop endgameArchive table, remove archive() function - replace archived boolean with deleted on endgameSubmissions - add submit_day timestamp column - replace round-based slip manager with /rubgram/admin/calendar route - add monthly jsonb column to endgameSettings for month checkmark toggle - add toggleMonth server action with SimpleTooltip UI - fix publicQueue SQL bug (ambiguous column reference + precedence) - wipe() now sets deleted=true instead of round-based archive - cancel() uses soft-delete (deleted=true) instead of hard-delete - guard calendar page with adminCheck - update count route to exclude deleted submissions
This commit is contained in:
+1
-8
@@ -2,7 +2,7 @@ import { env } from "node:process";
|
||||
import { cron, redis } from "bun";
|
||||
import { formatDistanceToNow } from "date-fns";
|
||||
import { and, asc, eq, gt, isNull, lt, not, sql } from "drizzle-orm";
|
||||
import { archive, removeExpiredSubmissions } from "@/app/(ui)/rubgram/api";
|
||||
import { removeExpiredSubmissions } from "@/app/(ui)/rubgram/api";
|
||||
import { auth, issueInternalToken } from "@/lib/auth";
|
||||
import { db } from "@/lib/db";
|
||||
import {
|
||||
@@ -272,13 +272,6 @@ async function cacheCards() {
|
||||
} else schedule(120, cacheCards);
|
||||
}
|
||||
|
||||
cron("0 0 1 * *", async function rubgramArchive() {
|
||||
const { log } = logger("rubgramArchive");
|
||||
log("Started...");
|
||||
await archive({});
|
||||
log("Done");
|
||||
});
|
||||
|
||||
cron("0 0 */14 * *", async function syncAmber() {
|
||||
const { log, error } = logger("syncAmber");
|
||||
log("Syncing...");
|
||||
|
||||
Reference in New Issue
Block a user