Add License Integration
This commit is contained in:
@@ -82,6 +82,10 @@ func (h *AuthHandler) AuthLogin(c *gin.Context) {
|
||||
},
|
||||
Site: site,
|
||||
ResetPassword: authUser.ResetPassword,
|
||||
PartnerLicense: &response.PartnerLicense{
|
||||
DaysToExpire: authUser.PartnerLicense.DaysToExpire,
|
||||
Status: authUser.PartnerLicense.LicenseStatus,
|
||||
},
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, response.BaseResponse{
|
||||
|
||||
@@ -1,15 +1,21 @@
|
||||
package response
|
||||
|
||||
type LoginResponse struct {
|
||||
Token string `json:"token"`
|
||||
Name string `json:"name"`
|
||||
Role Role `json:"role"`
|
||||
Partner *Partner `json:"partner"`
|
||||
Site *SiteName `json:"site,omitempty"`
|
||||
ResetPassword bool `json:"reset_password"`
|
||||
Token string `json:"token"`
|
||||
Name string `json:"name"`
|
||||
Role Role `json:"role"`
|
||||
Partner *Partner `json:"partner"`
|
||||
Site *SiteName `json:"site,omitempty"`
|
||||
ResetPassword bool `json:"reset_password"`
|
||||
PartnerLicense *PartnerLicense `json:"partner_license,omitempty"`
|
||||
}
|
||||
|
||||
type Role struct {
|
||||
ID int64 `json:"id"`
|
||||
Role string `json:"role_name"`
|
||||
}
|
||||
|
||||
type PartnerLicense struct {
|
||||
DaysToExpire int64 `json:"days_to_expire,omitempty"`
|
||||
Status string `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user