Deactivate Component - MarcoLagalla/marette_backend GitHub Wiki

Name Deactivate Component
Description Deactivate the panel component for the restaurant
URL restaurant/<int:id>/components/<str:type>/deactivate'
Allowed methods POST
Authorizations GET (IsBusiness, IsOwner)

POST

Deactivate the selected panel (set show=False) for the selected restaurant. Only the logged owner can make this request.

Params

Name Type Description
<int:id> integer Target restaurant ID
<str:type> RESTAURANT_COMPONENTS valid panel name

Return codes

Status Description
HTTP_200_OK panel activated
HTTP_404_NOT_FOUND restaurant with this ID not found
HTTP_400_BAD_REQUEST wrong parameters
HTTP_401_UNAUTHORIZED action not authorized
⚠️ **GitHub.com Fallback** ⚠️