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
a4dd05a2
authored
May 22, 2024
by
1808837298@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: pricing page group ratio (close #275)
parent
f3c240d6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
controller/model.go
+3
-2
No files found.
controller/model.go
View file @
a4dd05a2
...
@@ -203,9 +203,10 @@ func RetrieveModel(c *gin.Context) {
...
@@ -203,9 +203,10 @@ func RetrieveModel(c *gin.Context) {
func
GetPricing
(
c
*
gin
.
Context
)
{
func
GetPricing
(
c
*
gin
.
Context
)
{
userId
:=
c
.
GetInt
(
"id"
)
userId
:=
c
.
GetInt
(
"id"
)
group
,
err
:=
model
.
CacheGetUserGroup
(
userId
)
// if no login, get default group ratio
groupRatio
:=
common
.
GetGroupRatio
(
"default"
)
groupRatio
:=
common
.
GetGroupRatio
(
"default"
)
if
err
!=
nil
{
group
,
err
:=
model
.
CacheGetUserGroup
(
userId
)
if
err
==
nil
{
groupRatio
=
common
.
GetGroupRatio
(
group
)
groupRatio
=
common
.
GetGroupRatio
(
group
)
}
}
pricing
:=
model
.
GetPricing
(
group
)
pricing
:=
model
.
GetPricing
(
group
)
...
...
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