Custom route for extension Issue

System Information
  • Strapi Version: 4
  • Operating System: windows 11
  • Node Version: 16.19.1
  • NPM Version: 8.19.3
  • Yarn Version: 1.22.19

I have created my custom route with this file.

module.exports = (plugin) => {
    plugin.controllers.user.newOneMethod = (ctx) => {
        "method": "GET",
        "path": "/bob",
        "handler": "user.newOneMethod"

    return plugin

I see it when I do the command “yarn strapi routes:list”.

Moreover, it appears in the strapi admin panel, I checked the box labeled “newOneMethod”.

But when I try to access it with this URL “http://localhost:1337/api/users-permissions/bob”, it gives me a 404 error : “NotFoundError”.

Does anyone have an idea how to solve my problem?