refactor(server): auth dtos (#4881)

* refactor: auth dtos

* chore: open api
This commit is contained in:
Jason Rasmussen
2023-11-09 10:14:15 -05:00
committed by GitHub
parent 5c602bf4d4
commit 5423f1c25b
38 changed files with 187 additions and 657 deletions

View File

@@ -1,5 +1,5 @@
import { AdminSignupResponseDto, AuthDeviceResponseDto, LoginCredentialDto, LoginResponseDto } from '@app/domain';
import { adminSignupStub, loginResponseStub, loginStub, signupResponseStub } from '@test';
import { AuthDeviceResponseDto, LoginCredentialDto, LoginResponseDto, UserResponseDto } from '@app/domain';
import { adminSignupStub, loginResponseStub, loginStub } from '@test';
import request from 'supertest';
export const authApi = {
@@ -7,9 +7,8 @@ export const authApi = {
const { status, body } = await request(server).post('/auth/admin-sign-up').send(adminSignupStub);
expect(status).toBe(201);
expect(body).toEqual(signupResponseStub);
return body as AdminSignupResponseDto;
return body as UserResponseDto;
},
adminLogin: async (server: any) => {
const { status, body } = await request(server).post('/auth/login').send(loginStub.admin);