Skip to content

Commit

Permalink
fix: update noti settings
Browse files Browse the repository at this point in the history
  • Loading branch information
anhnh12 committed Dec 22, 2023
1 parent 73a010f commit 8df26ff
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 29 deletions.
10 changes: 0 additions & 10 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -8003,12 +8003,6 @@ const docTemplate = `{
"default_receiver_platform": {
"type": "string"
},
"default_token": {
"$ref": "#/definitions/model.PayToken"
},
"default_token_id": {
"type": "string"
},
"prioritized_token": {
"type": "array",
"items": {
Expand Down Expand Up @@ -8949,7 +8943,6 @@ const docTemplate = `{
"default_message_settings",
"default_money_source",
"default_receiver_platform",
"default_token",
"token_priorities",
"tx_limit_enable",
"tx_limit_settings"
Expand All @@ -8970,9 +8963,6 @@ const docTemplate = `{
"default_receiver_platform": {
"type": "string"
},
"default_token": {
"type": "string"
},
"token_priorities": {
"type": "array",
"items": {
Expand Down
10 changes: 0 additions & 10 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -7995,12 +7995,6 @@
"default_receiver_platform": {
"type": "string"
},
"default_token": {
"$ref": "#/definitions/model.PayToken"
},
"default_token_id": {
"type": "string"
},
"prioritized_token": {
"type": "array",
"items": {
Expand Down Expand Up @@ -8941,7 +8935,6 @@
"default_message_settings",
"default_money_source",
"default_receiver_platform",
"default_token",
"token_priorities",
"tx_limit_enable",
"tx_limit_settings"
Expand All @@ -8962,9 +8955,6 @@
"default_receiver_platform": {
"type": "string"
},
"default_token": {
"type": "string"
},
"token_priorities": {
"type": "array",
"items": {
Expand Down
7 changes: 0 additions & 7 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -965,10 +965,6 @@ definitions:
$ref: '#/definitions/model.MoneySource'
default_receiver_platform:
type: string
default_token:
$ref: '#/definitions/model.PayToken'
default_token_id:
type: string
prioritized_token:
items:
$ref: '#/definitions/model.PayToken'
Expand Down Expand Up @@ -1596,8 +1592,6 @@ definitions:
$ref: '#/definitions/request.MoneySource'
default_receiver_platform:
type: string
default_token:
type: string
token_priorities:
items:
type: string
Expand All @@ -1613,7 +1607,6 @@ definitions:
- default_message_settings
- default_money_source
- default_receiver_platform
- default_token
- token_priorities
- tx_limit_enable
- tx_limit_settings
Expand Down
2 changes: 1 addition & 1 deletion pkg/entities/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ func (e *Entity) UpdateUserNotificationSettings(uri request.UserSettingBaseUriRe
// update payment setting
userNotiSettings := model.UserNotificationSetting{
ProfileId: uri.ProfileId,
Enable: payload.Enable,
Enable: *payload.Enable,
Platforms: payload.Platforms,
Flags: payload.Flags,
NotificationSettings: notificationFlags,
Expand Down
2 changes: 1 addition & 1 deletion pkg/request/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ type PrivacySetting struct {
}

type UpdateNotificationSettingPayloadRequest struct {
Enable bool `json:"enable" binding:"required"`
Enable *bool `json:"enable" binding:"required"`
Platforms []string `json:"platforms" binding:"required"`
Flags map[string]bool `json:"flags" binding:"required"`
}

0 comments on commit 8df26ff

Please sign in to comment.