-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
APIv3: endpoints for notifications (#11009)
* Initial work for notifications API endpoints * Implement missing endpoints - `/api/v3/organizations/<slug>/notifications/` - `/api/v3/organizations/<slug>/notifications/<notification_pk>/` - `/api/v3/users/<username>/notifications/` - `/api/v3/users/<username>/notifications/<notification_pk>/` Note that only notifications endpoints are available for `users` and `organizations` currently. So, the following endpoints return 404 on purpose: - `/api/v3/organizations/` - `/api/v3/organizations/<slug>/` - `/api/v3/users/` - `/api/v3/users/<username>/` We can implement them when we are ready, but the pattern and structure of URLs is already prepared to support them. * Lint * Remove outdated comments * Refactor "notifications for user" as QuerySet This logic will be re-used when rendering templates. * Comments * Use `Subquery` to improve the db query * APIv3: lot of tests for the new endpoints * APIv3: update tests to make them pass * APIv3: update permissions on notification endpoints and add tests * APIv3: remove old comment code * APIv3: update `AdminPermission` to match what's expected * Wrong attribute
- Loading branch information
Showing
25 changed files
with
1,236 additions
and
108 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.