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

DELETE method not working for Contents API #7970

Open
fabian-st opened this issue Dec 9, 2022 · 0 comments
Open

DELETE method not working for Contents API #7970

fabian-st opened this issue Dec 9, 2022 · 0 comments

Comments

@fabian-st
Copy link

When attempting to delete a record using the REST API, a status "204 No Content" is returned (which indicates that the request was successful) but the record still remains unchanged.

Details

Question Answer
Relevant Bolt Version 5.1.18
Install type Composer install
PHP version 7.2
Web server Apache / Built-in

Reproduction

Bug summary

* Most likely an APIPlatform implementation fault
* Annotations for deleting content using the API are present in Bolt\Entity\Content

Specifics

* API route is `/api/contents/{id}`, method is DELETE
* API definition can be found by default under `/bolt/api`
* Bolt was installed using Composer CLI
* Bolt version is 5.1.28
* Clients used to verify the problems are Postman and PHP/Curl

Steps to reproduce

* Create a User with ROLE_WEBSERVICE
* Create an example record of any content type
* Make an HTTP call with DELETE method to `/api/contents/{id}` -> should return status 204
* Verify that the record has not been deleted

Expected result

* The record is deleted from the database completely

Actual result

* The record remains unchanged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant