System Information
- Strapi Version: 5.0.0-rc3
- Operating System: macos 12.5.1
- Database: mariadb
- Node Version: 18.19.0
- NPM Version: 10.8.2
Hi,
I am trying to create a custom route like this:
export default {
routes: [
{
method: 'GET',
path: '/commands/get-points',
handler: 'command.getPoints',
},
],
}
Here is my controller:
import { factories } from '@strapi/strapi'
export default factories.createCoreController('api::command.command', ({ strapi }) => ({
async getPoints() {
return "henlo"
},
}))
I enabled public access as you can see on this screenshot.
But this route always gives me a 404 response. On the contrary, when I use another HTTP method, it works: for example when setting the method to POST, this works.
→ the GET method is the problem.
I have other custom routes on GET method that just work, but on this object it does not. Why is it behaving like that ?