This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add an admin API for unprotecting local media from quarantine #10040
Add an admin API for unprotecting local media from quarantine #10040
Changes from 4 commits
d105029
b54d5e7
58f63a4
97c3564
37205b7
4621e49
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
does
DELETE
feel scary to anyone else? I feel like I'd be worrying that I'm deleting the media itself.I'd be inclined towards
POST /_synapse/admin/v1/media/unprotect/<media_id>
, but I don't have a very strong opinion.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.
I do not like so many URI. When you something create with
PUT
orPULL
you can revert it withDELETE
. This ist HTTP.We can add a sentence, that this do not delete a media. It only deletes the protection.
Do you have team call for discussing this? IMO there ist missin a kind of compliance for all oh the admin API.
Probably is need for an extensive API like for user.
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.
I agree that
DELETE
seems like the wrong semantic since you're updating the media, not deleting it.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.
@dklimpel so I did a straw poll among the team in #synapse-dev and the general feeling was that POST would be more intuitive than DELETE.
Although
DELETE
is in some ways the opposite ofPOST
, I don't think that's always the case, and it's certainly not the case that there are any standards around that.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. Now it is a
POST
request.