Added lib/types.

This commit is contained in:
Mike Cao 2022-12-02 14:15:24 -08:00
parent 06bebadbb9
commit 4781a0cc8c
12 changed files with 247 additions and 242 deletions

View file

@ -1,7 +1,7 @@
import { UserRole } from '@prisma/client';
import { NextApiRequestQueryBody } from 'interface/api/nextApi';
import { canUpdateUserRole } from 'lib/auth';
import { UmamiApi } from 'lib/constants';
import { Role } from 'lib/types';
import { useAuth } from 'lib/middleware';
import { NextApiResponse } from 'next';
import { badRequest, methodNotAllowed, ok, unauthorized } from 'next-basics';
@ -11,7 +11,7 @@ export interface UserRoleRequestQuery {
id: string;
}
export interface UserRoleRequestBody {
role: UmamiApi.Role;
role: Role;
userRoleId?: string;
}