title: Strapi custom endpoint is unavailable, returns not found
body: <p>I have created a custom controller with the following configurations:</p>
  <p>This is running on local docker containers. I have added other custom endpoints in similar manner but just recently when i added another endpoint, i got stuck with this issue.</p>
  <p>The below endpoint is showing under on the Roles &amp; Permissions in the Strapi dashboard</p>
  <p>Controller.js</p>
  <pre><code>module.exports = {
    async stock(ctx) {
      console.log(&quot;stocks called ==&quot;)
      return { message: &quot;success&quot; }
     }
  };
  </code></pre>
  <p>Routes.json</p>
  <pre><code>{
    &quot;method&quot;: &quot;GET&quot;,
    &quot;path&quot;: &quot;/materials/stock&quot;,
    &quot;handler&quot;: &quot;material.stock&quot;,
    &quot;config&quot;: {
      &quot;policies&quot;: []
    }
  }
  </code></pre>
  <p>Permission has been added for the authenticated user, but still when calling this endpoint http://localhost:80/materials/stock it returns with <code>{ &quot;statusCode&quot;: 404, &quot;error&quot;: &quot;Not Found&quot;, &quot;message&quot;: &quot;Not Found&quot; }</code></p>
  <p><code>Solution:</code></p>
  <p>Change the method to <code>POST</code>. Using the method as <code>GET</code> doesn't seems to be working. Some kind of bug with Strapi or probably something wrong with my configuration.</p>