This commit is contained in:
		| @@ -47,3 +47,8 @@ func (r *Response) ErrBadRequest() { | ||||
| func (r *Response) ErrUnauthorized() { | ||||
| 	r.Error(http.StatusUnauthorized, "未登录") | ||||
| } | ||||
|  | ||||
| // 账号或密码错误 | ||||
| func (r *Response) ErrBadAccPasswd() { | ||||
| 	r.Error(serializer.ErrBadLogin, "账号或密码错误") | ||||
| } | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| package dto | ||||
|  | ||||
| import ( | ||||
| 	"drive-linked/model" | ||||
| 	"drive-linked/pkg/model" | ||||
| 	"github.com/jinzhu/copier" | ||||
| ) | ||||
|  | ||||
| @@ -15,11 +15,6 @@ type UserProfile struct { | ||||
| 	Roles    string `json:"roles"` | ||||
| } | ||||
|  | ||||
| type QueryUserParams struct { | ||||
| 	Method string `json:"method"` | ||||
| 	Value  string `json:"value"` | ||||
| } | ||||
|  | ||||
| func (u *UserProfile) CopyOf(user *model.User) error { | ||||
| 	err := copier.Copy(u, user) | ||||
| 	if err != nil { | ||||
| @@ -27,3 +22,13 @@ func (u *UserProfile) CopyOf(user *model.User) error { | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
|  | ||||
| type QueryUserParams struct { | ||||
| 	Method string `json:"method"` | ||||
| 	Value  string `json:"value"` | ||||
| } | ||||
|  | ||||
| type LoginParams struct { | ||||
| 	Account  string `json:"account"` | ||||
| 	Password string `json:"password"` | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user