diff --git a/Services/server/src/routes.ts b/Services/server/src/routes.ts index 689bd83..35ed08e 100644 --- a/Services/server/src/routes.ts +++ b/Services/server/src/routes.ts @@ -291,7 +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.post('/cabinet/:cabinetName/drawer/:drawerName/folder/:folderName/file', - authenticateMiddleware([{"bearerAuth":[]}]), + authenticateMiddleware([{"bearerAuth":["admin"]}]), ...(fetchMiddlewares(FileController)), ...(fetchMiddlewares(FileController.prototype.uploadFile)), @@ -348,7 +348,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.patch('/cabinet/:cabinetName/drawer/:drawerName/folder/:folderName/file/:fileName', - authenticateMiddleware([{"bearerAuth":[]}]), + authenticateMiddleware([{"bearerAuth":["admin"]}]), ...(fetchMiddlewares(FileController)), ...(fetchMiddlewares(FileController.prototype.updateFile)), @@ -379,7 +379,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":[]}]), + authenticateMiddleware([{"bearerAuth":["admin"]}]), ...(fetchMiddlewares(FileController)), ...(fetchMiddlewares(FileController.prototype.deleteFile)), diff --git a/Services/server/src/swagger.json b/Services/server/src/swagger.json index 6b57bcb..a997829 100644 --- a/Services/server/src/swagger.json +++ b/Services/server/src/swagger.json @@ -539,7 +539,7 @@ "operationId": "UploadFile", "responses": { "201": { - "description": "", + "description": "สำเร็จ", "content": { "application/json": { "schema": { @@ -607,6 +607,9 @@ } } } + }, + "404": { + "description": "ไม่พบลิ้นชัก" } }, "tags": [ @@ -614,7 +617,9 @@ ], "security": [ { - "bearerAuth": [] + "bearerAuth": [ + "admin" + ] } ], "parameters": [ @@ -682,7 +687,7 @@ "operationId": "GetFile", "responses": { "200": { - "description": "", + "description": "สำเร็จ", "content": { "application/json": { "schema": { @@ -732,7 +737,7 @@ "operationId": "UpdateFile", "responses": { "200": { - "description": "", + "description": "สำเร็จ", "content": { "application/json": { "schema": { @@ -753,6 +758,9 @@ } } } + }, + "404": { + "description": "ไม่พบตำแหน่งที่ต้องการสร้างแฟ้ม" } }, "tags": [ @@ -760,7 +768,9 @@ ], "security": [ { - "bearerAuth": [] + "bearerAuth": [ + "admin" + ] } ], "parameters": [ @@ -829,7 +839,7 @@ "operationId": "DeleteFile", "responses": { "200": { - "description": "" + "description": "สำเร็จ" } }, "tags": [ @@ -837,7 +847,9 @@ ], "security": [ { - "bearerAuth": [] + "bearerAuth": [ + "admin" + ] } ], "parameters": [ @@ -973,7 +985,7 @@ } }, "tags": [ - "File" + "Download" ], "security": [], "parameters": [ @@ -1067,7 +1079,7 @@ "description": "สำเร็จ" }, "404": { - "description": "ไม่พบของแฟ้ม" + "description": "ไม่พบตำแหน่งที่ต้องการสร้างแฟ้ม" }, "500": { "description": "เกิดข้อผิดพลาดกับระบบจัดการไฟล์"