🎨 update code structure
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
package user_controller
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// RefreshTokenRequest 刷新token请求
|
||||
type RefreshTokenRequest struct {
|
||||
RefreshToken string `json:"refresh_token" binding:"required"`
|
||||
@@ -37,19 +35,3 @@ type ResetPasswordRequest struct {
|
||||
Password string `json:"password" binding:"required"`
|
||||
Repassword string `json:"repassword" binding:"required"`
|
||||
}
|
||||
|
||||
// ResponseData 返回数据
|
||||
type ResponseData struct {
|
||||
AccessToken string `json:"access_token"`
|
||||
RefreshToken string `json:"refresh_token"`
|
||||
ExpiresAt int64 `json:"expires_at"`
|
||||
UID *string `json:"uid"`
|
||||
}
|
||||
|
||||
func (res ResponseData) MarshalBinary() ([]byte, error) {
|
||||
return json.Marshal(res)
|
||||
}
|
||||
|
||||
func (res ResponseData) UnmarshalBinary(data []byte) error {
|
||||
return json.Unmarshal(data, &res)
|
||||
}
|
||||
|
Reference in New Issue
Block a user