Vytvor endpoint pre hodnotenia predmetov#283
Open
j-matus wants to merge 1 commit intofmfi-svt:masterfrom
Open
Conversation
Vytvor API endpoint, ktory vracia pre kazdy predmet za kazdy semester jeho hodnotenie. Closes fmfi-svt#256
Author
|
Tento endpoint by mal vracat to co query v #256, mam ale este dve otazky:
|
Adman
requested changes
Jul 1, 2020
Member
Adman
left a comment
There was a problem hiding this comment.
@j-matus Vdaka za PR!
Doplnil som iba take malickosti.
Co sa tyka toho bodu 2, tak tam je pre databazu nastaveny specialny user.
Pokazene prava su asi iba na tvojej databaze. Ked pouzijem inu aa_<nieco>, tak viem selectovat z toho Viewu.
| public function ratingsAction() { | ||
| $request = $this->get('request'); | ||
| $user = $this->get('anketa.access.statistics')->getUser(); | ||
| if ($request->getMethod() != 'POST' && $user === null) { |
Member
There was a problem hiding this comment.
Tu dajme iba GET. POST nema zmysel, kedze neposielame ziadne data.
| } | ||
|
|
||
| public function getSubjectsRatings() { | ||
| $sql = 'SELECT code,name,slug,season_id,score '. |
| defaults: { _controller: AnketaBundle:Api:results, _format: json } | ||
| options: { i18n: false } | ||
| api_ratings: | ||
| pattern: /api/v1/ratings/ |
Member
There was a problem hiding this comment.
Tu by sme mohli vymazat to /api, kedze ten link je aktualne /api/api/...
Member
|
@j-matus Vies to prosim este otestovat nejako, ci to vracia dobre vysledky? |
Member
|
@j-matus Ahoj, mas nejake novinky ohladom tohto? |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Vytvor API endpoint, ktory vracia pre kazdy predmet za kazdy semester
jeho hodnotenie. Closes #256
This change is