Check deletedAt. (#1796)

This commit is contained in:
Brian Cao 2023-02-27 16:01:34 -08:00 committed by GitHub
parent 5657a64c77
commit 84430e38eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 47 additions and 52 deletions

View file

@ -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');