This repository was archived by the owner on Oct 29, 2020. It is now read-only.
Adds competition param to signup index#6322
Merged
itsjoekent merged 3 commits intoDoSomethingArchive:devfrom Mar 25, 2016
Merged
Adds competition param to signup index#6322itsjoekent merged 3 commits intoDoSomethingArchive:devfrom
itsjoekent merged 3 commits intoDoSomethingArchive:devfrom
Conversation
Contributor
|
Just fyi, don't use integers in the examples or what gets passed as params. More obvious to use |
Contributor
Author
|
gotcha! |
| ], | ||
| [ | ||
| 'name' => 'competition', | ||
| 'description' => 'Only competition signups, defaults to 0.', |
Contributor
Author
There was a problem hiding this comment.
true false true false
Contributor
|
@deadlybutter does this play nice with other params? can we request competition signups for just one campaign? |
Contributor
|
ahh, sorry hit close instead of comment! |
Contributor
Author
|
SHAME. |
Contributor
Author
|
@angaither let me give that a try actually, but i think it should |
Contributor
|
👍 from me! |
Contributor
Author
|
can confirm it works with the other params @angaither also @weerd updated your stuffs |
Contributor
|
K. Rechecking 💃 |
| 'campaigns' => dosomething_helpers_format_data($parameters['campaigns']), | ||
| 'count' => (int) $parameters['count'] ?: 25, | ||
| 'page' => (int) $parameters['page'], | ||
| 'competition' => (int) $parameters['competition'] ?: NULL, |
Contributor
There was a problem hiding this comment.
No need to cast to (int) here.
Contributor
Author
|
already fixed @weerd haha |
Contributor
|
Cool! 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's this PR do?
Adds competition parameter to the signup index endpoint, this does two things.
1- Only include signups that are marked as competition signups.
2- Order the signups by quantity.
How should this be manually tested?
Checkout
http://dev.dosomething.org:8888/api/v1/signups?competition=1Any background context you want to provide?
nope
What are the relevant tickets?
Fixes #6316