Add read-only Noya admin panel with assignments and UX polish.
Ship admin auth, user overview, assessments, chats, assignment filters/export, security hardening, and a separate desktop admin shell with clearer assessment answers. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
export const APP_NAME = 'Novya API';
|
||||
export const APP_DESCRIPTION = 'Novya learning platform backend API';
|
||||
|
||||
/** Minimum wait after completing session N before session N+1 unlocks. Set to 0 to disable cooldown (dev/testing). */
|
||||
export const SESSION_UNLOCK_INTERVAL_MS = 0;
|
||||
/** Minimum wait after completing session N before session N+1 unlocks (sessions 3–10). */
|
||||
export const SESSION_UNLOCK_INTERVAL_MS = 24 * 60 * 60 * 1000;
|
||||
|
||||
export const DEFAULT_PAGE = 1;
|
||||
export const DEFAULT_PAGE_SIZE = 20;
|
||||
|
||||
@@ -40,5 +40,6 @@ export interface AuthenticatedUser {
|
||||
externalId: string;
|
||||
email: string | null;
|
||||
isGuest: boolean;
|
||||
role: 'user' | 'admin';
|
||||
sessionId: bigint;
|
||||
}
|
||||
|
||||
@@ -16,3 +16,11 @@ export function queryValidator<T extends ZodType>(schema: T) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function paramValidator<T extends ZodType>(schema: T) {
|
||||
return zValidator('param', schema, (result) => {
|
||||
if (!result.success) {
|
||||
throw result.error;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user