-
Notifications
You must be signed in to change notification settings - Fork 1.9k
fix: Get and delete event favourite using event_id #6063
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: Get and delete event favourite using event_id #6063
Conversation
|
@uds5501 @mrsaicharan1 @shreyanshdwivedi Can you guys please have a look at this. I have tested everything locally, generated the docs, checked the response, everything works fine. Can you guys please see why the tests are failing. |
|
Mostly the docs which have been updated in the |
|
@mrsaicharan1 Yaa, dredd is failing, that's sure. I would try one more thing. |
| ## Favourite Events Detail [/v1/user-favourite-events/{event_id}] | ||
| + Parameters | ||
| + user_favourite_event_id: 1 (integer) - ID of the Favourite Event | ||
| + event_id: 1 (integer) - ID of the Event in the form of an integer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing name of parameters won't fix anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iamareebjamal But it should be changed, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, your version is more explicit, but if you changed it in hopes that it'll fix the error, then it won't
5b899ff to
2a615ba
Compare
|
@uds5501 @mrsaicharan1 @shreyanshdwivedi While using current_user, it shows |
|
@prateekj117 are you trying FE or Postman? If postman maybe you haven't authenticated yourself |
|
@shreyanshdwivedi Trying postman. I have authenticated myself. |
| """ | ||
| User Favourite Events detail by id | ||
| """ | ||
| @jwt_required() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
paranthesis is redundant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iamareebjamal It shows error when not using paranthesis.

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
Codecov Report
@@ Coverage Diff @@
## development #6063 +/- ##
===============================================
- Coverage 66.4% 66.37% -0.03%
===============================================
Files 286 286
Lines 14348 14359 +11
===============================================
+ Hits 9528 9531 +3
- Misses 4820 4828 +8
Continue to review full report at Codecov.
|
app/api/user_favourite_events.py
Outdated
| view_kwargs['id'] = None | ||
|
|
||
| @jwt_required() | ||
| def before_delete_object(self, view_kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unneeded. Remove
app/api/user_favourite_events.py
Outdated
| user_favourite_event = UserFavouriteEvent.query.filter_by( | ||
| user=current_user, event_id=view_kwargs['id']).first() | ||
| except NoResultFound: | ||
| raise ObjectNotFound({'source': ''}, "Object: not found") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set proper source
|
@iamareebjamal Please review. |
|
Follow semantic PR title |
|
@iamareebjamal Please review. |
|
I thought this was already merged |
Fixes #5857
Checklist
developmentbranch.Short description of what this resolves:
Delete a favourite event using Event ID.