mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 06:07:17 +01:00
Merge branch 'dev' into feat/um-285-report-schema
This commit is contained in:
commit
dd2db308ee
7 changed files with 48 additions and 42 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue