aboutsummaryrefslogtreecommitdiff
path: root/internal/route/api/v1/user
diff options
context:
space:
mode:
authorJoe Chen <jc@unknwon.io>2023-02-02 21:25:25 +0800
committerGitHub <noreply@github.com>2023-02-02 21:25:25 +0800
commitc53a1998c589a544b25d53f6e6fdf0f24a4df25b (patch)
tree1c3c9d693ba551eecfbc535be942e40b5acf9cf7 /internal/route/api/v1/user
parent614382fec0ba05149785539ab93560d4d42c194d (diff)
all: replace `interface{}` with `any` (#7330)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Diffstat (limited to 'internal/route/api/v1/user')
-rw-r--r--internal/route/api/v1/user/user.go4
1 files changed, 2 insertions, 2 deletions
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,
})