One of the saddest things is when your favourite caf/workplace closes. But we have to just accept and move on. Also, make a DELETE request to our server and update the database.

But we can't let just anyone delete things in our database. We might soon end up with someone accidentally deleting everything.

We can add a security feature by requiring an api-key . If they have the api-key "TopSecretAPIKey" then they're allowed to make the delete request, otherwise, we tell them they are not authorized to make that request. A 403 in HTTP speak.

Check out all the HTTP Codes: https://httpstatuses.com/

1. Complete this challenge by adding the DELETE route to /report-closed/<cafe_id>

e.g. The request via Postman might look like this:

And if they have the wrong api-key:

And if the caf with that id doesn't exist:


SOLUTION