Merge branch 'dev' into feat/um-285-report-schema

This commit is contained in:
Brian Cao committed 2023-05-08 23:47:25 -07:00
commit dd2db308ee
7 files changed
+48 -42

No files matched your search

+1 -1
View File
@@ -51,11 +51,11 @@ export default async (
data.password = hashPassword(password);
}
// Only admin can change these fields
if (role && isAdmin) {
data.role = role;
}
// Only admin can change these fields
if (username && isAdmin) {
data.username = username;
}
+2 -2
View File
@@ -1,8 +1,8 @@
import { NextApiResponse } from 'next';
import { methodNotAllowed, ok, serverError, unauthorized } from 'next-basics';
import { Website, NextApiRequestQueryBody } from 'lib/types';
import { canViewWebsite, canUpdateWebsite, canDeleteWebsite } from 'lib/auth';
import { useAuth, useCors } from 'lib/middleware';
import { NextApiResponse } from 'next';
import { methodNotAllowed, ok, serverError, unauthorized } from 'next-basics';
import { deleteWebsite, getWebsite, updateWebsite } from 'queries';
export interface WebsiteRequestQuery {