Add REST API pt. 3 - Add Magazine User/Moderator/Owner APIs #950

Merged
ernest merged 73 commits from rideranton/kbin-core:feature/api-magazine into develop 2023-09-04 19:06:56 +00:00

This PR is one of a series of PRs adding the API in chunks to help aid the review process!

The previous PR is here

Changes in this PR:

  • Add magazine retrieve, subscribe, block, and modlog APIs
  • Add moderation APIs that allow mods to:
    • View bans, reports, and trash
    • Respond to reports
    • Ban or unban users
    • Trash or restore content
  • Add magazine owner APIs that allow the owner of the magazine to:
    • Add/remove badges, moderators, tags
    • Edit settings and theme
    • Delete the magazine's icon
    • Create a new magazine
    • Delete the magazine
    • View magazine views/votes/content stats
  • Add tests exercising every new endpoint added
### This PR is one of a series of PRs adding the API in chunks to help aid the review process! The previous PR is [here](https://codeberg.org/Kbin/kbin-core/pulls/883) Changes in this PR: * Add magazine retrieve, subscribe, block, and modlog APIs * Add moderation APIs that allow mods to: * View bans, reports, and trash * Respond to reports * Ban or unban users * Trash or restore content * Add magazine owner APIs that allow the owner of the magazine to: * Add/remove badges, moderators, tags * Edit settings and theme * Delete the magazine's icon * Create a new magazine * Delete the magazine * View magazine views/votes/content stats * Add tests exercising every new endpoint added
rideranton force-pushed feature/api-magazine from 97dcc8cc2e to 5efbbc7560 2023-08-06 01:39:41 +00:00 Compare
rideranton force-pushed feature/api-magazine from 5efbbc7560 to db94101975 2023-08-06 02:16:35 +00:00 Compare
rideranton changed title from WIP: Add REST API pt. 4 - Add Magazine User/Moderator/Owner APIs to WIP: Add REST API pt. 3 - Add Magazine User/Moderator/Owner APIs 2023-08-06 20:51:10 +00:00
rideranton force-pushed feature/api-magazine from 86c44f6abf to 5abdc28ad5 2023-08-07 00:33:25 +00:00 Compare
rideranton force-pushed feature/api-magazine from 5abdc28ad5 to d9d585134c 2023-08-07 01:00:20 +00:00 Compare
rideranton force-pushed feature/api-magazine from ca42ec7a34 to 13fb2bf526 2023-08-11 19:33:16 +00:00 Compare
rideranton force-pushed feature/api-magazine from 7b6af15804 to b5fbc9149e 2023-08-12 22:40:24 +00:00 Compare
rideranton force-pushed feature/api-magazine from b5fbc9149e to 884a9e22a7 2023-08-12 22:45:18 +00:00 Compare
rideranton force-pushed feature/api-magazine from 5620bb5c68 to b462927288 2023-08-15 14:20:44 +00:00 Compare
rideranton force-pushed feature/api-magazine from b462927288 to 70ba9bcfd3 2023-08-15 14:35:10 +00:00 Compare
rideranton force-pushed feature/api-magazine from 70ba9bcfd3 to d370713ea5 2023-08-19 01:30:22 +00:00 Compare
rideranton added 2 commits 2023-08-19 02:10:47 +00:00
Kbin CI/CD pipeline / build (pull_request) Successful in 40s Details
Kbin CI/CD pipeline / unit-test (pull_request) Successful in 22s Details
Kbin CI/CD pipeline / fixer-dry-run (pull_request) Failing after 26s Details
718bf0359d
Add moderator add/remove API tests
rideranton added 6 commits 2023-08-19 04:42:01 +00:00
rideranton added 1 commit 2023-08-19 04:43:03 +00:00
Kbin CI/CD pipeline / unit-test (pull_request) Successful in 21s Details
Kbin CI/CD pipeline / build (pull_request) Successful in 38s Details
Kbin CI/CD pipeline / fixer-dry-run (pull_request) Successful in 26s Details
330e164658
Run fixer
rideranton changed title from WIP: Add REST API pt. 3 - Add Magazine User/Moderator/Owner APIs to Add REST API pt. 3 - Add Magazine User/Moderator/Owner APIs 2023-08-19 04:52:24 +00:00
rideranton requested review from ernest 2023-08-19 04:53:01 +00:00
rideranton requested review from melroy89 2023-08-19 04:53:02 +00:00
rideranton requested review from cooperaj 2023-08-19 04:53:02 +00:00
rideranton added 1 commit 2023-08-19 04:55:01 +00:00
Kbin CI/CD pipeline / build (pull_request) Successful in 37s Details
Kbin CI/CD pipeline / unit-test (pull_request) Successful in 21s Details
Kbin CI/CD pipeline / fixer-dry-run (pull_request) Successful in 26s Details
97fdf0c837
Fix typo in .env.example and add admin only oauth clients variable to v2

Sweet, I'll be testing today. Thanks.

Sweet, I'll be testing today. Thanks.
rideranton force-pushed feature/api-magazine from 97fdf0c837 to bc01c713e1 2023-08-22 02:45:55 +00:00 Compare
rideranton added 1 commit 2023-08-22 05:28:03 +00:00
Kbin CI/CD pipeline / unit-test (pull_request) Successful in 22s Details
Kbin CI/CD pipeline / build (pull_request) Successful in 39s Details
Kbin CI/CD pipeline / fixer-dry-run (pull_request) Successful in 26s Details
e900b2b4b6
Remove unnecessary jsonSerialize calls
rideranton added 1 commit 2023-08-22 05:35:08 +00:00
Kbin CI/CD pipeline / build (pull_request) Successful in 37s Details
Kbin CI/CD pipeline / unit-test (pull_request) Successful in 21s Details
Kbin CI/CD pipeline / fixer-dry-run (pull_request) Successful in 26s Details
ca59521d7d
Fix a missed jsonSerialize
szsz reviewed 2023-08-23 09:28:01 +00:00
.env.example Outdated
@ -36,3 +36,3 @@
KBIN_CAPTCHA_ENABLED=false
# Only let admins generated oauth clients
# Only let admins generate oauth clients
KBIN_ADMIN_ONLY_OAUTH_CLIENTS=false

this env var shouldn't be between KBIN_CAPTCHA_ENABLED and other CAPTCHA env vars

this env var shouldn't be between KBIN_CAPTCHA_ENABLED and other CAPTCHA env vars

@rideranton This seems to be fixed on develop. Try to rebase?

@rideranton This seems to be fixed on develop. Try to rebase?
rideranton marked this conversation as resolved
@ -0,0 +2,4 @@
api_magazine_entries_retrieve:
controller: App\Controller\Api\Entry\MagazineEntriesRetrieveApi
defaults: { sort: hot, time: ∞ }
path: /api/magazine/{magazine_id}/entries/{sort}/{time}

I think query params should be used for all filters and sorting, for consistency in all endpoints

I think query params should be used for all filters and sorting, for consistency in all endpoints

That endpoint is using the convention set by the entry front endpoints

Also it probably shouldn't have been included in this PR since the Entry API controllers aren't included here

That endpoint is using the convention set by the [entry front endpoints](https://codeberg.org/Kbin/kbin-core/src/commit/3920b53fabc09641e9c8847ac1d5857839483312/config/kbin_routes/front.yaml#L8) Also it probably shouldn't have been included in this PR since the Entry API controllers aren't included here

Exactly, those are front routing endpoints, while it makes sense to have "pretty urls" like those on the website, I believe that in API meant for other developers, mixing path variables and query parameters, in this endpoint or any other, is confusing

Exactly, those are front routing endpoints, while it makes sense to have "pretty urls" like those on the website, I believe that in API meant for other developers, mixing path variables and query parameters, in this endpoint or any other, is confusing

Sure, that makes sense - I'll remove the paths that aren't used in this PR and when they are added in a later PR I'll change the path variables to query parameters

Sure, that makes sense - I'll remove the paths that aren't used in this PR and when they are added in a later PR I'll change the path variables to query parameters
rideranton marked this conversation as resolved

Sweet, I'll be testing today. Thanks.

what is your conclusion after 2 weeks?

> Sweet, I'll be testing today. Thanks. what is your conclusion after 2 weeks?
melroy89 added the
backend
API
labels 2023-08-30 15:43:25 +00:00
rideranton added 1 commit 2023-08-31 00:07:35 +00:00
Kbin CI/CD pipeline / build (pull_request) Successful in 41s Details
Kbin CI/CD pipeline / unit-test (pull_request) Successful in 26s Details
Kbin CI/CD pipeline / fixer-dry-run (pull_request) Successful in 26s Details
7d5b5f47c3
Remove unused paths from this PR - these will be added when entries and posts APIs are added
rideranton force-pushed feature/api-magazine from 7d5b5f47c3 to 6b8106f60f 2023-08-31 00:11:36 +00:00 Compare
rideranton added 2 commits 2023-09-02 16:46:18 +00:00
Kbin CI/CD pipeline / unit-test (pull_request) Successful in 20s Details
Kbin CI/CD pipeline / build (pull_request) Successful in 38s Details
Kbin CI/CD pipeline / fixer-dry-run (pull_request) Successful in 24s Details
83b2a31aff
Rename ModLog -> Modlog
rideranton force-pushed feature/api-magazine from 83b2a31aff to fb5cac0049 2023-09-02 16:48:05 +00:00 Compare
rideranton force-pushed feature/api-magazine from fb5cac0049 to 597434d841 2023-09-02 17:30:28 +00:00 Compare
rideranton force-pushed feature/api-magazine from 597434d841 to 2a515e125c 2023-09-04 17:00:37 +00:00 Compare
rideranton force-pushed feature/api-magazine from 2a515e125c to e5b204bc76 2023-09-04 18:47:26 +00:00 Compare
rideranton force-pushed feature/api-magazine from e5b204bc76 to ebad492c4d 2023-09-04 19:02:43 +00:00 Compare
ernest merged commit efd005fad6 into develop 2023-09-04 19:06:56 +00:00

Regression impact! #1094, #1097.. and properly more issues..

Regression impact! https://codeberg.org/Kbin/kbin-core/issues/1094, https://codeberg.org/Kbin/kbin-core/issues/1097.. and properly more issues..
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Kbin/kbin-core#950
There is no content yet.