Web API for code.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

17 lines
651 B

  1. import { HttpResponse } from 'src/packages/fastify-send-data'
  2. import { Session } from 'src/modules/auth/models'
  3. import { constants } from 'http2'
  4. import { HttpError } from 'src/packages/fastify-compliant-http-errors'
  5. export class LoggedInData extends HttpResponse<Session>(constants.HTTP_STATUS_OK, 'Logged In') {
  6. }
  7. export class LoggedOutData extends HttpResponse(constants.HTTP_STATUS_NO_CONTENT, 'Logged Out') {
  8. }
  9. export class UnableToLogInError extends HttpError(constants.HTTP_STATUS_UNAUTHORIZED, 'Unable to Log In') {
  10. }
  11. export class UnableToLogOutError extends HttpError(constants.HTTP_STATUS_INTERNAL_SERVER_ERROR, 'Unable to Log Out') {
  12. }