Fix lint debt from admin overhaul; make check/lint/test/build green
- Scope @typescript-eslint/no-explicit-any off for *.spec.ts test doubles - Type enhance() submit callbacks with SubmitFunction in api-keys page - Drop as-any casts in proclamations upsert by using typed form data - Fix useless regex escapes in profiles phone validation - Remove unused locals param from api-keys load - Use resolve() for admin nav/error links; store literal hrefs in adminModels - Update README admin section and ADMIN_OVERHAUL lint caveat
This commit is contained in:
@@ -5,7 +5,7 @@ import { rotateApiKey } from '$lib/server/api-key';
|
||||
|
||||
const SUPER = 1;
|
||||
|
||||
export const load: PageServerLoad = async ({ locals, parent }) => {
|
||||
export const load: PageServerLoad = async ({ parent }) => {
|
||||
const { adminUser } = await parent();
|
||||
if (adminUser.roleId > SUPER) {
|
||||
throw error(403, 'Only Super admins can manage API keys');
|
||||
|
||||
Reference in New Issue
Block a user