Delete Restaurant - MarcoLagalla/marette_backend GitHub Wiki

Name Delete Restaurant
Description Delete this restaurant from db
URL restaurant/<int:id>/delete
Allowed methods POST
Authorizations IsAuthenticated, IsBusiness, IsOwner

POST

Parameter Type Description
id int valid restaurant id

Params

Parameter Type Required Description
confirm str yes Must contain restaurant.url

Confirm field must contain the restaurant URL as action confirmation (prevents hotlink calls)

Remove the selected restaurant from the database (NOT REVERSIBLE).

Return codes

Status Description
HTTP_200_OK deleted
HTTP_404_NOT_FOUND product or restaurant not found
HTTP_401_UNAUTHORIZED action not authorized
⚠️ **GitHub.com Fallback** ⚠️