Skip to content

Commit

Permalink
[mobile] add password change request
Browse files Browse the repository at this point in the history
  • Loading branch information
capcom6 committed Dec 1, 2024
1 parent 6ec784e commit 9719fc5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
12 changes: 0 additions & 12 deletions smsgateway/requests.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
package smsgateway

// Device registration request
type MobileRegisterRequest struct {
Name *string `json:"name,omitempty" validate:"omitempty,max=128" example:"Android Phone"` // Device name
PushToken *string `json:"pushToken" validate:"omitempty,max=256" example:"gHz-T6NezDlOfllr7F-Be"` // FCM token
}

// Device update request
type MobileUpdateRequest struct {
Id string `json:"id" example:"QslD_GefqiYV6RQXdkM6V"` // ID
PushToken string `json:"pushToken" validate:"omitempty,max=256" example:"gHz-T6NezDlOfllr7F-Be"` // FCM token
}

// Push request
type UpstreamPushRequest = []PushNotification
19 changes: 19 additions & 0 deletions smsgateway/requests_mobile.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package smsgateway

// Device registration request
type MobileRegisterRequest struct {
Name *string `json:"name,omitempty" validate:"omitempty,max=128" example:"Android Phone"` // Device name
PushToken *string `json:"pushToken" validate:"omitempty,max=256" example:"gHz-T6NezDlOfllr7F-Be"` // FCM token
}

// Device update request
type MobileUpdateRequest struct {
Id string `json:"id" example:"QslD_GefqiYV6RQXdkM6V"` // ID
PushToken string `json:"pushToken" validate:"omitempty,max=256" example:"gHz-T6NezDlOfllr7F-Be"` // FCM token
}

// Device change password request
type MobileChangePasswordRequest struct {
CurrentPassword string `json:"currentPassword" validate:"required" example:"cp2pydvxd2zwpx"` // Current password
NewPassword string `json:"newPassword" validate:"required,min=14" example:"cp2pydvxd2zwpx"` // New password, at least 14 characters
}

0 comments on commit 9719fc5

Please sign in to comment.