Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
7a13f9c9
authored
Feb 22, 2025
by
1808837298@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: Ensure correct quota warning threshold type conversion
parent
1c20d16c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
controller/user.go
+5
-5
web/src/components/PersonalSetting.js
+1
-1
No files found.
controller/user.go
View file @
7a13f9c9
...
...
@@ -913,11 +913,11 @@ func TopUp(c *gin.Context) {
}
type
UpdateUserSettingRequest
struct
{
QuotaWarningType
string
`json:"notify_type"`
QuotaWarningThreshold
int
`json:"quota_warning_threshold"`
WebhookUrl
string
`json:"webhook_url,omitempty"`
WebhookSecret
string
`json:"webhook_secret,omitempty"`
NotificationEmail
string
`json:"notification_email,omitempty"`
QuotaWarningType
string
`json:"notify_type"`
QuotaWarningThreshold
float64
`json:"quota_warning_threshold"`
WebhookUrl
string
`json:"webhook_url,omitempty"`
WebhookSecret
string
`json:"webhook_secret,omitempty"`
NotificationEmail
string
`json:"notification_email,omitempty"`
}
func
UpdateUserSetting
(
c
*
gin
.
Context
)
{
...
...
web/src/components/PersonalSetting.js
View file @
7a13f9c9
...
...
@@ -330,7 +330,7 @@ const PersonalSetting = () => {
try
{
const
res
=
await
API
.
put
(
'/api/user/setting'
,
{
notify_type
:
notificationSettings
.
warningType
,
quota_warning_threshold
:
notificationSettings
.
warningThreshold
,
quota_warning_threshold
:
parseFloat
(
notificationSettings
.
warningThreshold
)
,
webhook_url
:
notificationSettings
.
webhookUrl
,
webhook_secret
:
notificationSettings
.
webhookSecret
,
notification_email
:
notificationSettings
.
notificationEmail
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment