diff options
Diffstat (limited to 'internal/route/api/v1')
-rw-r--r-- | internal/route/api/v1/repo/repo.go | 8 | ||||
-rw-r--r-- | internal/route/api/v1/user/user.go | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/internal/route/api/v1/repo/repo.go b/internal/route/api/v1/repo/repo.go index c0e3b612..089269ac 100644 --- a/internal/route/api/v1/repo/repo.go +++ b/internal/route/api/v1/repo/repo.go @@ -34,7 +34,7 @@ func Search(c *context.APIContext) { } else { u, err := db.Users.GetByID(c.Req.Context(), opts.OwnerID) if err != nil { - c.JSON(http.StatusInternalServerError, map[string]interface{}{ + c.JSON(http.StatusInternalServerError, map[string]any{ "ok": false, "error": err.Error(), }) @@ -49,7 +49,7 @@ func Search(c *context.APIContext) { repos, count, err := db.SearchRepositoryByName(opts) if err != nil { - c.JSON(http.StatusInternalServerError, map[string]interface{}{ + c.JSON(http.StatusInternalServerError, map[string]any{ "ok": false, "error": err.Error(), }) @@ -57,7 +57,7 @@ func Search(c *context.APIContext) { } if err = db.RepositoryList(repos).LoadAttributes(); err != nil { - c.JSON(http.StatusInternalServerError, map[string]interface{}{ + c.JSON(http.StatusInternalServerError, map[string]any{ "ok": false, "error": err.Error(), }) @@ -70,7 +70,7 @@ func Search(c *context.APIContext) { } c.SetLinkHeader(int(count), opts.PageSize) - c.JSONSuccess(map[string]interface{}{ + c.JSONSuccess(map[string]any{ "ok": true, "data": results, }) diff --git a/internal/route/api/v1/user/user.go b/internal/route/api/v1/user/user.go index 10d82b9a..b311f68b 100644 --- a/internal/route/api/v1/user/user.go +++ b/internal/route/api/v1/user/user.go @@ -28,7 +28,7 @@ func Search(c *context.APIContext) { users, _, err := db.SearchUserByName(opts) if err != nil { - c.JSON(http.StatusInternalServerError, map[string]interface{}{ + c.JSON(http.StatusInternalServerError, map[string]any{ "ok": false, "error": err.Error(), }) @@ -48,7 +48,7 @@ func Search(c *context.APIContext) { } } - c.JSONSuccess(map[string]interface{}{ + c.JSONSuccess(map[string]any{ "ok": true, "data": results, }) |