patch: fix schemas
This commit is contained in:
@ -32,7 +32,11 @@ import {
|
||||
MANIPULATE_STORAGE_SUCCESS,
|
||||
GET_STORAGES_LIST_SUCCESS,
|
||||
} from './api.responses';
|
||||
import { AuthRequest, StorageCreateRequest } from './schemas';
|
||||
import {
|
||||
AuthRequest,
|
||||
StorageCreateRequest,
|
||||
StorageUpdateRequest,
|
||||
} from './schemas';
|
||||
import { Storage, StorageCreate, StorageList, StorageUpdate } from './types';
|
||||
|
||||
@Controller()
|
||||
@ -107,6 +111,10 @@ export class AppController {
|
||||
name: 'id',
|
||||
description: 'id storage',
|
||||
})
|
||||
@ApiBody({
|
||||
type: StorageUpdateRequest,
|
||||
description: 'Объект обновления storage',
|
||||
})
|
||||
@Header(...ALLOW_ORIGIN_ALL)
|
||||
@ApiResponse(MANIPULATE_STORAGE_SUCCESS)
|
||||
@ApiResponse(AUTH_ERROR)
|
||||
|
||||
@ -68,3 +68,8 @@ export class StorageCreateRequest implements StorageCreate {
|
||||
@ApiProperty()
|
||||
storageName: string;
|
||||
}
|
||||
|
||||
export class StorageUpdateRequest {
|
||||
@ApiProperty()
|
||||
data: object;
|
||||
}
|
||||
|
||||
@ -23,5 +23,5 @@ export type StorageCreate = {
|
||||
|
||||
export type StorageUpdate = {
|
||||
data: object;
|
||||
storageName?: string;
|
||||
storageName: string;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user