Merge branch 'dev' into feat/um-285-report-schema
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user