Doubt in redirect function

Sir, in the api.js file when we are redirecting to ‘/api’, shouldn’t we do ‘/api/persons/’. How is it working?

It has been redirected to /api/persons only
Check again