mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 06:37:18 +01:00
Merge branch 'dev' of https://github.com/umami-software/umami into feat/um-171-cloud-mode-env-variable
This commit is contained in:
commit
a777b2916f
88 changed files with 1014 additions and 945 deletions
|
|
@ -2,10 +2,10 @@ import { canCreateUser, canViewUsers } from 'lib/auth';
|
|||
import { ROLES } from 'lib/constants';
|
||||
import { uuid } from 'lib/crypto';
|
||||
import { useAuth } from 'lib/middleware';
|
||||
import { NextApiRequestQueryBody } from 'lib/types';
|
||||
import { NextApiRequestQueryBody, User } from 'lib/types';
|
||||
import { NextApiResponse } from 'next';
|
||||
import { badRequest, hashPassword, methodNotAllowed, ok, unauthorized } from 'next-basics';
|
||||
import { createUser, getUser, getUsers, User } from 'queries';
|
||||
import { createUser, getUser, getUsers } from 'queries';
|
||||
|
||||
export interface UsersRequestBody {
|
||||
username: string;
|
||||
|
|
@ -36,7 +36,7 @@ export default async (
|
|||
|
||||
const { username, password, id } = req.body;
|
||||
|
||||
const existingUser = await getUser({ username });
|
||||
const existingUser = await getUser({ username }, { showDeleted: true });
|
||||
|
||||
if (existingUser) {
|
||||
return badRequest(res, 'User already exists');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue