style the scaling not working to fix
This commit is contained in:
@@ -7,7 +7,7 @@ import {
|
||||
Body,
|
||||
Delete,
|
||||
BadRequestException,
|
||||
UnprocessableEntityException,
|
||||
DuplicateException,
|
||||
HttpCode,
|
||||
Put,
|
||||
InternalServerErrorException,
|
||||
@@ -77,7 +77,7 @@ export class AuthController {
|
||||
} catch (e) {
|
||||
// check if the error is a duplicate key error
|
||||
if (e.code === 'P2002') {
|
||||
throw new UnprocessableEntityException('Username or email already taken');
|
||||
throw new DuplicateException('Username or email already taken');
|
||||
}
|
||||
console.error(e);
|
||||
throw new BadRequestException();
|
||||
|
||||
@@ -30,7 +30,7 @@ Register Duplicates
|
||||
# We can't use the `Register` keyword because it assert for success
|
||||
POST /auth/register {"username": "user-duplicate", "password": "pass", "email": "mail@kyoo.moe"}
|
||||
Output
|
||||
Integer response status 422
|
||||
Integer response status 409
|
||||
Login user-duplicate
|
||||
[Teardown] DELETE /auth/me
|
||||
|
||||
|
||||
Reference in New Issue
Block a user