add service and first method to controller
This commit is contained in:
22
src/api.responses.ts
Normal file
22
src/api.responses.ts
Normal file
@ -0,0 +1,22 @@
|
||||
import { ApiResponseOptions } from '@nestjs/swagger';
|
||||
import { StorageResponse } from './schemas';
|
||||
|
||||
export const AUTH_SUCCESS: ApiResponseOptions = {
|
||||
status: 200,
|
||||
description: 'Токен пользователя',
|
||||
type: String,
|
||||
};
|
||||
|
||||
export const AUTH_ERROR: ApiResponseOptions = {
|
||||
status: 406,
|
||||
description:
|
||||
'Ошибка, при попытке получить доступ к данным без токена или с не корректным токеном',
|
||||
type: Error,
|
||||
};
|
||||
|
||||
export const GET_STORAGES_LIST_SUCCESS: ApiResponseOptions = {
|
||||
status: 200,
|
||||
description: 'Список всех картинок',
|
||||
type: StorageResponse,
|
||||
isArray: true,
|
||||
};
|
||||
Reference in New Issue
Block a user