Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Backend - Engine
Project
Project
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
242
Issues
242
List
Boards
Labels
Service Desk
Milestones
Merge Requests
34
Merge Requests
34
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
Packages
Packages
List
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Backend - Engine
Commits
03e2d8ad
Commit
03e2d8ad
authored
1 hour ago
by
Ben Hayward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated variable name to better reflect value held
parent
41597350
feat/pending-boost-limit-591
1 merge request
!310
[Sprint/ModestMonkey](feat): Added in pending boost limit for #591
Pipeline
#80739607
passed with stages
in 13 minutes and 39 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
boost.php
Controllers/api/v2/boost.php
+2
-2
Manager.php
Core/Boost/Network/Manager.php
+2
-2
No files found.
Controllers/api/v2/boost.php
View file @
03e2d8ad
...
...
@@ -298,10 +298,10 @@ class boost implements Interfaces\Api
}
if
(
$manager
->
isPendingLimitExceededBy
(
$boost
))
{
$max
Daily
=
Di
::
_
()
->
get
(
'Config'
)
->
get
(
'max_pending_boosts'
);
$max
Pending
=
Di
::
_
()
->
get
(
'Config'
)
->
get
(
'max_pending_boosts'
);
return
Factory
::
response
([
'status'
=>
'error'
,
'message'
=>
"Exceeded maximum of "
.
$max
Daily
.
" pending boosts at a time."
'message'
=>
"Exceeded maximum of "
.
$max
Pending
.
" pending boosts at a time."
]);
}
...
...
This diff is collapsed.
Click to expand it.
Core/Boost/Network/Manager.php
View file @
03e2d8ad
...
...
@@ -171,8 +171,8 @@ class Manager
public
function
isPendingLimitExceededBy
(
$boost
)
{
$offchain
=
$this
->
getOffchainBoosts
(
$boost
,
4
,
'review'
);
$max
Daily
=
$this
->
config
->
get
(
'max_pending_boosts'
);
return
count
(
$offchain
)
>=
$max
Daily
;
$max
Pending
=
$this
->
config
->
get
(
'max_pending_boosts'
);
return
count
(
$offchain
)
>=
$max
Pending
;
}
/**
...
...
This diff is collapsed.
Click to expand it.
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