This commit is contained in:
Jay
2018-04-17 17:16:03 +08:00
parent 880a32a9c8
commit a45b1f3603
6 changed files with 181 additions and 10 deletions
+23
View File
@@ -0,0 +1,23 @@
package account
import (
"git.trj.tw/golang/go-gallery/modules/context"
)
// UserLogin route
func UserLogin(c *context.Context) {
loginArg := struct {
Account string `form:"account" json:"account" binding:"required"`
Password string `form:"password" json:"password" binding:"required"`
}{
Account: "",
Password: "",
}
err := c.ShouldBind(&loginArg)
if err != nil {
c.NotFound("body not found")
return
}
c.Success("api success")
}