feat: rbac完善,file接入完成
This commit is contained in:
@@ -21,12 +21,48 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
Path: "/:id",
|
||||
Handler: file.GetFileByIdHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
// 创建存储配置
|
||||
Method: http.MethodPost,
|
||||
Path: "/config/create",
|
||||
Handler: file.CreateStorageConfigHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
// 删除存储配置
|
||||
Method: http.MethodPost,
|
||||
Path: "/config/delete",
|
||||
Handler: file.DeleteStorageConfigHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
// 获取存储配置列表
|
||||
Method: http.MethodPost,
|
||||
Path: "/config/list",
|
||||
Handler: file.GetStorageConfigListHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
// 设置默认存储配置
|
||||
Method: http.MethodPost,
|
||||
Path: "/config/setDefault",
|
||||
Handler: file.SetDefaultStorageConfigHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
// 更新存储配置
|
||||
Method: http.MethodPost,
|
||||
Path: "/config/update",
|
||||
Handler: file.UpdateStorageConfigHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
// 删除文件
|
||||
Method: http.MethodDelete,
|
||||
Method: http.MethodPost,
|
||||
Path: "/delete",
|
||||
Handler: file.DeleteFileHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
// 下载文件
|
||||
Method: http.MethodGet,
|
||||
Path: "/download/:id",
|
||||
Handler: file.DownloadFileHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
// 文件列表
|
||||
Method: http.MethodPost,
|
||||
|
||||
Reference in New Issue
Block a user