misc cleanup

This commit is contained in:
Devin Zuczek
2026-07-21 01:20:20 -04:00
parent 41fa8b9979
commit 086441f6f5
7 changed files with 12 additions and 11 deletions
+2 -4
View File
@@ -4,6 +4,7 @@ import { useWorkersLogger } from 'workers-tagged-logger'
import { withOnError } from '@repo/hono-helpers'
import { NotificationType } from '../../notify/src/notification-types'
import { docsPage, fetchSpec } from './docs'
import { accountsBase, apiBase, authBase, imgBase, notifyBase, postForm } from './upstream'
@@ -37,9 +38,6 @@ const WEB_PLATFORM = '4'
*/
const ADMIN_ROLES = new Set(['developer', 'moderator'])
/** `NotificationType.ServerMaintenance` in the notify worker's enum. */
const SERVER_MAINTENANCE = 25
/** Cookie flags for the session token. `secure` is dropped for local http dev. */
function sessionCookieOptions(c: Context<App>, maxAge: number): CookieOptions {
const local = c.env.ENVIRONMENT === 'development' || c.env.ENVIRONMENT === 'VITEST'
@@ -247,7 +245,7 @@ const app = new Hono<App>()
method: 'POST',
headers: { 'content-type': 'application/json', authorization: `Bearer ${token}` },
body: JSON.stringify({
notificationType: SERVER_MAINTENANCE,
notificationType: NotificationType.ServerMaintenance,
data: { StartsInMinutes: startsIn },
}),
})