fix: tiny formatting and style fix
This commit is contained in:
parent
35364a7f8a
commit
40cce63350
3 changed files with 5 additions and 3 deletions
|
@ -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();
|
||||
|
|
|
@ -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>,
|
||||
|
|
|
@ -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