feat: use multi roles login

- add support for protected roles
- refactor oauth code
This commit is contained in:
Lakhan Samani
2021-10-13 21:44:44 +05:30
parent 27944cf7b5
commit e99d8cbb7b
17 changed files with 229 additions and 160 deletions

View File

@@ -32,9 +32,9 @@ type ForgotPasswordInput struct {
}
type LoginInput struct {
Email string `json:"email"`
Password string `json:"password"`
Role *string `json:"role"`
Email string `json:"email"`
Password string `json:"password"`
Roles []string `json:"roles"`
}
type Meta struct {
@@ -62,13 +62,13 @@ type Response struct {
}
type SignUpInput struct {
FirstName *string `json:"firstName"`
LastName *string `json:"lastName"`
Email string `json:"email"`
Password string `json:"password"`
ConfirmPassword string `json:"confirmPassword"`
Image *string `json:"image"`
Roles []*string `json:"roles"`
FirstName *string `json:"firstName"`
LastName *string `json:"lastName"`
Email string `json:"email"`
Password string `json:"password"`
ConfirmPassword string `json:"confirmPassword"`
Image *string `json:"image"`
Roles []string `json:"roles"`
}
type UpdateProfileInput struct {