add org structure
This commit is contained in:
@@ -17,7 +17,7 @@ func (h *Handler) Login(c echo.Context) (err error) {
|
||||
|
||||
u.Password = fmt.Sprintf("%x", sha256.Sum256([]byte(u.Password)))
|
||||
|
||||
var t = h.DB.Where("user_name = ? AND password = ?", u.UserName, u.Password).First(&u)
|
||||
var t = h.DB.Model(&model.User{}).Preload("Position").Where("user_name = ? AND password = ?", u.UserName, u.Password).First(&u)
|
||||
|
||||
if t.RowsAffected == 0 {
|
||||
return c.NoContent(http.StatusNotFound)
|
||||
|
||||
Reference in New Issue
Block a user