chore: add security to previous commit

This commit is contained in:
Methapon2001 2023-11-20 12:04:26 +07:00
parent a0d70fbb38
commit c95ea595ce
No known key found for this signature in database
GPG key ID: 849924FEF46BD132
3 changed files with 14 additions and 2 deletions

View file

@ -112,6 +112,7 @@ export class FileController extends Controller {
@Get("/{cabinetName}/drawer/{drawerName}/folder/{folderName}/file")
@Tags("File")
@Security("bearerAuth")
@SuccessResponse(HttpStatusCode.OK)
public async getFile(
@Path() cabinetName: string,
@ -169,6 +170,7 @@ export class FileController extends Controller {
@Delete("/{cabinetName}/drawer/{drawerName}/folder/{folderName}/file/{fileName}")
@Tags("File")
@Security("bearerAuth")
@SuccessResponse(HttpStatusCode.OK)
public async deleteFile(
@Path() cabinetName: string,

View file

@ -291,6 +291,7 @@ 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
app.get('/cabinet/:cabinetName/drawer/:drawerName/folder/:folderName/file',
authenticateMiddleware([{"bearerAuth":[]}]),
...(fetchMiddlewares<RequestHandler>(FileController)),
...(fetchMiddlewares<RequestHandler>(FileController.prototype.getFile)),
@ -318,6 +319,7 @@ 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
app.delete('/cabinet/:cabinetName/drawer/:drawerName/folder/:folderName/file/:fileName',
authenticateMiddleware([{"bearerAuth":[]}]),
...(fetchMiddlewares<RequestHandler>(FileController)),
...(fetchMiddlewares<RequestHandler>(FileController.prototype.deleteFile)),

View file

@ -539,7 +539,11 @@
"tags": [
"File"
],
"security": [],
"security": [
{
"bearerAuth": []
}
],
"parameters": [
{
"in": "path",
@ -579,7 +583,11 @@
"tags": [
"File"
],
"security": [],
"security": [
{
"bearerAuth": []
}
],
"parameters": [
{
"in": "path",