login token
This commit is contained in:
parent
2947647c07
commit
14a0862f33
|
@ -15,7 +15,7 @@ func NewStaffTokenDao() *StaffTokenDao {
|
|||
}
|
||||
|
||||
func (d *StaffTokenDao) TableName() string {
|
||||
return "staff_token"
|
||||
return "user_token"
|
||||
}
|
||||
|
||||
func (d *StaffTokenDao) Create(o *model.StaffToken) (int64, error) {
|
||||
|
|
|
@ -19,7 +19,8 @@ func (s *Staff) Login(ctx *gin.Context) {
|
|||
var req api.StaffLoginReq
|
||||
session.CheckParamError(ctx.ShouldBindJSON(&req))
|
||||
sess := ctx.Keys[session.ContextSession].(*session.AdminSession)
|
||||
new(service.StaffUser).Login(sess, &req)
|
||||
data := new(service.StaffUser).Login(sess, &req)
|
||||
ctx.JSON(http.StatusOK, session.NewRsp(data))
|
||||
}
|
||||
|
||||
func (s *Staff) Salary(ctx *gin.Context) {
|
||||
|
|
Loading…
Reference in New Issue