Skip to content

Commit

Permalink
fix http method bug
Browse files Browse the repository at this point in the history
  • Loading branch information
patyhank committed Apr 29, 2023
1 parent 6b1e90e commit 714b425
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ func main() {

})

r.GET("/getUser", func(c *gin.Context) {
r.POST("/getUser", func(c *gin.Context) {
reloadAccount()
buf := new(bytes.Buffer)
buf.ReadFrom(c.Request.Body)
Expand All @@ -260,10 +260,10 @@ func main() {
return
}
authTemp[user] = auth
c.String(200, "text/plain", auth.Name)
c.Data(200, "text/plain", []byte(auth.Name))
log.Printf("[getUser] Code [%v]: %v\n", user, auth.Name)
})
r.GET("/login", func(c *gin.Context) {
r.POST("/login", func(c *gin.Context) {
reloadAccount()
result, _ := io.ReadAll(c.Request.Body)
var req ReqBody
Expand Down

0 comments on commit 714b425

Please sign in to comment.