Question · Vibe coding with Claude Code course · Module 12: Medium clone

A lock only in the button

The agent hid the Publish button from the writer, but the route POST /api/articles/[id]/publish does not check the role. What will happen?

Answer options

  • Nothing, because without the button a request cannot be sent
  • The writer will publish the text with a request sent bypassing the page, for example with a curl command
  • The route will reject the request with code 403, because it knows the roles from the component
  • Next.js will block the route in production mode

You can check the correct answer by solving this task in the CodeWorlds game.