fix: tiny formatting and style fix
This commit is contained in:
parent
35364a7f8a
commit
40cce63350
3 changed files with 5 additions and 3 deletions
|
@ -130,6 +130,7 @@ func (h *FileHandlers) Create(c *gin.Context) {
|
|||
|
||||
userID := c.MustGet(q.UserIDParam).(string)
|
||||
fsFilePath, err := h.getFSFilePath(userID, req.Path)
|
||||
|
||||
if err != nil {
|
||||
if errors.Is(err, os.ErrExist) {
|
||||
c.JSON(q.ErrResp(c, 400, err))
|
||||
|
@ -254,6 +255,7 @@ func (h *FileHandlers) Delete(c *gin.Context) {
|
|||
c.JSON(q.ErrResp(c, 400, errors.New("invalid file path")))
|
||||
return
|
||||
}
|
||||
|
||||
role := c.MustGet(q.RoleParam).(string)
|
||||
userName := c.MustGet(q.UserParam).(string)
|
||||
if !h.canAccess(userName, role, "delete", filePath) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue