Use signup table in Signup API.

This commit is contained in:
Yang Luo
2021-06-17 00:49:02 +08:00
parent 3274bd0c7c
commit b11b3b6021
5 changed files with 161 additions and 75 deletions

View File

@ -58,6 +58,11 @@ func (c *ApiController) ResponseError(error string) {
c.ServeJSON()
}
func (c *ApiController) ResponseErrorWithData(error string, data interface{}) {
c.Data["json"] = Response{Status: "error", Msg: error, Data: data}
c.ServeJSON()
}
func (c *ApiController) RequireSignedIn() (string, bool) {
userId := c.GetSessionUser()
if userId == "" {