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

fix: fix api routes #1932

Merged
merged 13 commits into from
Oct 27, 2018
Merged

fix: fix api routes #1932

merged 13 commits into from
Oct 27, 2018

Conversation

asbiin
Copy link
Member

@asbiin asbiin commented Oct 22, 2018

Fixes:

  • POST /activities/ and PUT /activities/:id now checks for ActivityType activity_type_id to be from the same account
  • DELETE /activities/:id now works
  • GET /activitytypes/ is filtered to the account
  • GET /lifeevents/:id now works

Changes:

  • POST /contacts/:contact_id/pets is replaced with POST /pets/, with the use of contact_id (the route already exists)
  • PUT /contacts/:contact_id/pets/:id is replaced with PUT /pets/:id, with the use of contact_id (the route already exists)
  • Every validator fails now send a HTTP 400 code (was 200) with the error 32
  • Every Invald Parameters errors now send a HTTP 400 (was 500 or 200) code with the error 41
  • Every QueryException now send a HTTP 500 code with the error 40

@asbiin asbiin requested a review from djaiss October 26, 2018 06:27
Copy link
Member

@djaiss djaiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work @asbiin

@djaiss
Copy link
Member

djaiss commented Oct 27, 2018

@asbiin don't forget the CHANGELOG though!

@asbiin asbiin merged commit 080b2c5 into master Oct 27, 2018
@asbiin asbiin deleted the fix/api-routes branch October 27, 2018 07:16
@github-actions
Copy link

This pull request has been automatically locked since there
has not been any recent activity after it was closed.
Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants