add service and first method to controller

This commit is contained in:
Николай Вигдоров
2025-03-01 23:54:08 +03:00
parent 83ad4d43cd
commit 12b3d5b23c
10 changed files with 632 additions and 17 deletions

22
src/api.responses.ts Normal file
View 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,
};