Skip to content

Commit fee9932

Browse files
committed
refactor
1 parent e5190eb commit fee9932

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

pkg/group/get_group.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ import (
1313
func GetGroup(ctx echo.Context, dbClient db.Client, params api.GetGroupParams) (api.ResGetGroup, *response.Error) {
1414
res := api.ResGetGroup{}
1515
userId := ctx.Get("user_id").(string)
16-
events, err := getGroupList(dbClient, userId, params.Offset)
16+
groups, err := getGroupList(dbClient, userId, params.Offset)
1717
if err != nil {
1818
return api.ResGetGroup{}, err
1919
}
20-
rerr := copier.Copy(&res.Groups, &events)
20+
rerr := copier.Copy(&res.Groups, &groups)
2121
if rerr != nil {
2222
return api.ResGetGroup{}, &response.Error{Code: http.StatusInternalServerError, Level: "Error", Message: "グループ一覧の取得に失敗しました", Log: rerr.Error()}
2323
}

pkg/storage/get_storage_myfile.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,5 @@ func getFileListFromUserID(dbClient db.Client, userId string) ([]file, *response
4646
if err != nil {
4747
return []file{}, &response.Error{Code: http.StatusInternalServerError, Level: "Error", Message: "不明なエラーが発生しました", Log: err.Error()}
4848
}
49-
if len(files) == 0 {
50-
return []file{}, nil
51-
}
5249
return files, nil
5350
}

0 commit comments

Comments
 (0)