feat: verify online and management role
This commit is contained in:
parent
d6bf3ed879
commit
a7f012bda2
10 changed files with 117 additions and 62 deletions
|
|
@ -64,7 +64,7 @@ export class CabinetController extends Controller {
|
|||
|
||||
@Post("/")
|
||||
@Tags("ตู้เอกสาร")
|
||||
@Security("bearerAuth", ["admin"])
|
||||
@Security("bearerAuth", ["admin", "management-role"])
|
||||
@Response(HttpStatusCode.INTERNAL_SERVER_ERROR, "เกิดข้อผิดพลาดกับระบบจัดการไฟล์")
|
||||
@SuccessResponse(HttpStatusCode.CREATED, "สำเร็จ")
|
||||
public async createCabinet(
|
||||
|
|
@ -94,7 +94,7 @@ export class CabinetController extends Controller {
|
|||
*/
|
||||
@Put("/{cabinetName}")
|
||||
@Tags("ตู้เอกสาร")
|
||||
@Security("bearerAuth", ["admin"])
|
||||
@Security("bearerAuth", ["admin", "management-role"])
|
||||
@Response(HttpStatusCode.INTERNAL_SERVER_ERROR, "เกิดข้อผิดพลาดไม่สามารถย้ายไฟล์ได้")
|
||||
@SuccessResponse(HttpStatusCode.NO_CONTENT, "สำเร็จ")
|
||||
public async editCabinet(
|
||||
|
|
@ -163,7 +163,7 @@ export class CabinetController extends Controller {
|
|||
*/
|
||||
@Delete("/{cabinetName}")
|
||||
@Tags("ตู้เอกสาร")
|
||||
@Security("bearerAuth", ["admin"])
|
||||
@Security("bearerAuth", ["admin", "management-role"])
|
||||
@Response(HttpStatusCode.INTERNAL_SERVER_ERROR, "เกิดข้อผิดพลาด ไม่สามารถลบไฟล์ได้")
|
||||
@SuccessResponse(HttpStatusCode.NO_CONTENT, "สำเร็จ")
|
||||
public async deleteCabinet(@Path() cabinetName: string) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue