36 lines
1.1 KiB
Go
36 lines
1.1 KiB
Go
package dto
|
|
|
|
// The customer app has no password and no PIN: it authenticates on a 4-digit
|
|
// code sent to a phone or an email address, and its request shapes are declared
|
|
// inline in controllers/cxAuthController.go alongside the handlers that read
|
|
// them. The PIN register/login/verify/reset request types that used to live
|
|
// here went with that flow.
|
|
|
|
type MilerLoginRequest struct {
|
|
Phone string `json:"phone" xml:"phone" form:"phone"`
|
|
Configid int `json:"configid"`
|
|
}
|
|
|
|
type MilerPinVerifyRequest struct {
|
|
Phone string `json:"phone" xml:"phone" form:"phone"`
|
|
Pin string `json:"pin" xml:"pin" form:"pin"`
|
|
Configid int `json:"configid"`
|
|
DeviceToken string `json:"device_token"`
|
|
}
|
|
|
|
type MilerResetPinRequest struct {
|
|
Phone string `json:"phone" xml:"phone" form:"phone"`
|
|
NewPin string `json:"new_pin" xml:"new_pin" form:"new_pin"`
|
|
Configid int `json:"configid"`
|
|
}
|
|
|
|
type AdminLoginRequest struct {
|
|
Email string `json:"email" xml:"email" form:"email"`
|
|
Password string `json:"password" xml:"password" form:"password"`
|
|
}
|
|
|
|
type LoginResponse struct {
|
|
Token string `json:"token"`
|
|
User interface{} `json:"user"`
|
|
}
|