Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JobsByOrganizationAPI should return JSON by default, JSON-P via Parameter #477

Closed
mbo-s opened this issue Sep 4, 2018 · 2 comments
Closed

Comments

@mbo-s
Copy link

mbo-s commented Sep 4, 2018

Currently the jobapi returns JSON-P with a hardcoded yawikParseJobs
https://github.com/cross-solution/YAWIK/blob/develop/module/Jobs/src/Jobs/Controller/ApiJobListByOrganizationController.php#L45
e.g.
https://yawik.org/demo/de/api/jobs/organization/55ae775c6b10f8f05b8b457f

Is it possible to return by default only JSON and JSON-P via a dynamic callback Parameter e.g.
https://yawik.org/demo/de/api/jobs/organization/55ae775c6b10f8f05b8b457f?callback=mycallbackfunction

@TiSiE what do you think?

@cbleek
Copy link
Member

cbleek commented Sep 6, 2018

this is much better than the current hardcoded callback name.

I've implemented the callback name as an additional
route parameter.

So an URL will look like api/jobs/organization/55ae775c6b10f8f05b8b457f/myCallBack

cbleek added a commit that referenced this issue Sep 6, 2018
* adds "callback" as a query parameter (gh-477)
* adds unittest
* renames $sm to $serviceManager
@cbleek
Copy link
Member

cbleek commented Sep 6, 2018

@cbleek cbleek closed this as completed Sep 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants