Skip to content

Commit

Permalink
Merge pull request #141 from Baihhh/bugFix
Browse files Browse the repository at this point in the history
fix: search value is '' & user delete and edit
  • Loading branch information
IRONICBo authored Feb 19, 2024
2 parents ff53e85 + bd49bf4 commit 3c9069a
Show file tree
Hide file tree
Showing 7 changed files with 233 additions and 231 deletions.
13 changes: 7 additions & 6 deletions cmd/gopcomm/community_yap.gox
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ get "/user/:id", ctx => {
"CurrentUser": strings.Replace(string(userClaimJson), `\"`, `"`, -1),
"User": user,
"Items": strings.Replace(string(itemsJson), `\"`, `"`, -1),
"UserId": user.Id,
}
}

Expand Down Expand Up @@ -264,12 +265,12 @@ get "/get", ctx => {

get "/search", ctx => {
searchValue := ctx.param("value")
if searchValue == "" {
ctx.json {
"code": 400,
"err": "value can not be ''.",
}
}
// if searchValue == "" {
// ctx.json {
// "code": 400,
// "err": "value can not be ''.",
// }
// }

// todo middleware
var user *core.User
Expand Down
Loading

0 comments on commit 3c9069a

Please sign in to comment.