chore: updated route
This commit is contained in:
parent
627567abf6
commit
44259437f6
2 changed files with 144 additions and 26 deletions
|
|
@ -291,7 +291,6 @@ export function RegisterRoutes(app: Router) {
|
||||||
});
|
});
|
||||||
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
||||||
app.get('/cabinet/:cabinetName/drawer/:drawerName/folder/:folderName/file',
|
app.get('/cabinet/:cabinetName/drawer/:drawerName/folder/:folderName/file',
|
||||||
authenticateMiddleware([{"bearerAuth":[]}]),
|
|
||||||
...(fetchMiddlewares<RequestHandler>(FileController)),
|
...(fetchMiddlewares<RequestHandler>(FileController)),
|
||||||
...(fetchMiddlewares<RequestHandler>(FileController.prototype.getFile)),
|
...(fetchMiddlewares<RequestHandler>(FileController.prototype.getFile)),
|
||||||
|
|
||||||
|
|
@ -318,6 +317,42 @@ export function RegisterRoutes(app: Router) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
||||||
|
app.patch('/cabinet/:cabinetName/drawer/:drawerName/folder/:folderName/file/:fileName',
|
||||||
|
authenticateMiddleware([{"bearerAuth":[]}]),
|
||||||
|
upload.single('file'),
|
||||||
|
...(fetchMiddlewares<RequestHandler>(FileController)),
|
||||||
|
...(fetchMiddlewares<RequestHandler>(FileController.prototype.updateFile)),
|
||||||
|
|
||||||
|
function FileController_updateFile(request: any, response: any, next: any) {
|
||||||
|
const args = {
|
||||||
|
request: {"in":"request","name":"request","required":true,"dataType":"object"},
|
||||||
|
cabinetName: {"in":"path","name":"cabinetName","required":true,"dataType":"string"},
|
||||||
|
drawerName: {"in":"path","name":"drawerName","required":true,"dataType":"string"},
|
||||||
|
folderName: {"in":"path","name":"folderName","required":true,"dataType":"string"},
|
||||||
|
fileName: {"in":"path","name":"fileName","required":true,"dataType":"string"},
|
||||||
|
file: {"in":"formData","name":"file","dataType":"file"},
|
||||||
|
title: {"in":"formData","name":"title","dataType":"string"},
|
||||||
|
description: {"in":"formData","name":"description","dataType":"string"},
|
||||||
|
keyword: {"in":"formData","name":"keyword","dataType":"string"},
|
||||||
|
category: {"in":"formData","name":"category","dataType":"string"},
|
||||||
|
};
|
||||||
|
|
||||||
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
||||||
|
|
||||||
|
let validatedArgs: any[] = [];
|
||||||
|
try {
|
||||||
|
validatedArgs = getValidatedArgs(args, request, response);
|
||||||
|
|
||||||
|
const controller = new FileController();
|
||||||
|
|
||||||
|
|
||||||
|
const promise = controller.updateFile.apply(controller, validatedArgs as any);
|
||||||
|
promiseHandler(controller, promise, response, 200, next);
|
||||||
|
} catch (err) {
|
||||||
|
return next(err);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
||||||
app.delete('/cabinet/:cabinetName/drawer/:drawerName/folder/:folderName/file/:fileName',
|
app.delete('/cabinet/:cabinetName/drawer/:drawerName/folder/:folderName/file/:fileName',
|
||||||
authenticateMiddleware([{"bearerAuth":[]}]),
|
authenticateMiddleware([{"bearerAuth":[]}]),
|
||||||
...(fetchMiddlewares<RequestHandler>(FileController)),
|
...(fetchMiddlewares<RequestHandler>(FileController)),
|
||||||
|
|
|
||||||
|
|
@ -463,20 +463,6 @@
|
||||||
"schema": {
|
"schema": {
|
||||||
"items": {
|
"items": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"updatedBy": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "string",
|
|
||||||
"format": "date-time"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"createdBy": {
|
"createdBy": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
|
@ -491,16 +477,27 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"type": {
|
"updatedBy": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"category": {
|
"updatedAt": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"keyword": {
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"type": "array"
|
"type": "array"
|
||||||
},
|
},
|
||||||
"keyword": {
|
"category": {
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
|
@ -512,20 +509,32 @@
|
||||||
"title": {
|
"title": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"fileType": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"fileSize": {
|
||||||
|
"type": "number",
|
||||||
|
"format": "double"
|
||||||
|
},
|
||||||
|
"fileName": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"pathname": {
|
"pathname": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
"updatedBy",
|
|
||||||
"updatedAt",
|
|
||||||
"createdBy",
|
"createdBy",
|
||||||
"createdAt",
|
"createdAt",
|
||||||
"type",
|
"updatedBy",
|
||||||
"category",
|
"updatedAt",
|
||||||
"keyword",
|
"keyword",
|
||||||
|
"category",
|
||||||
"description",
|
"description",
|
||||||
"title",
|
"title",
|
||||||
|
"fileType",
|
||||||
|
"fileSize",
|
||||||
|
"fileName",
|
||||||
"pathname"
|
"pathname"
|
||||||
],
|
],
|
||||||
"type": "object"
|
"type": "object"
|
||||||
|
|
@ -539,6 +548,46 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"File"
|
"File"
|
||||||
],
|
],
|
||||||
|
"security": [],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "cabinetName",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "drawerName",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "folderName",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/cabinet/{cabinetName}/drawer/{drawerName}/folder/{folderName}/file/{fileName}": {
|
||||||
|
"patch": {
|
||||||
|
"operationId": "UpdateFile",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tags": [
|
||||||
|
"File"
|
||||||
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
{
|
||||||
"bearerAuth": []
|
"bearerAuth": []
|
||||||
|
|
@ -568,11 +617,45 @@
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "fileName",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
}
|
"requestBody": {
|
||||||
},
|
"required": false,
|
||||||
"/cabinet/{cabinetName}/drawer/{drawerName}/folder/{folderName}/file/{fileName}": {
|
"content": {
|
||||||
|
"multipart/form-data": {
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"file": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "binary"
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"keyword": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"category": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"delete": {
|
"delete": {
|
||||||
"operationId": "DeleteFile",
|
"operationId": "DeleteFile",
|
||||||
"responses": {
|
"responses": {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue