24 lines
455 B
Go
24 lines
455 B
Go
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")
|
|
}
|