fix: tiny formatting and style fix

This commit is contained in:
hexxa 2022-04-05 17:33:37 +08:00 committed by Hexxa
parent 35364a7f8a
commit 40cce63350
3 changed files with 5 additions and 3 deletions

View file

@ -36,9 +36,9 @@ export class QuickshareAPI {
return this.updater.props;
};
deleteInArray = async(itemsToDel: Array<string>): Promise<string> => {
deleteInArray = async (itemsToDel: Array<string>): Promise<string> => {
return await this.updater.deleteInArray(itemsToDel);
}
};
}
const api = new QuickshareAPI();

View file

@ -62,7 +62,7 @@ export class TopBar extends React.Component<Props, State, {}> {
id="topbar-title"
href="https://github.com/ihexxa/quickshare"
target="_blank"
className="h5"
className="h5 bold"
>
Quickshare
</a>,

View file

@ -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) {