Strapi route returns 404

47 views Asked by At

I have setup a directory under src/api folder for my singleType data with schema like this:

{
  "kind": "singleType",
  "name": "default_currency",
  "collectionName": "default-currencies",
  "info": {
    "singularName": "default-currency",
    "pluralName": "default-currencies",
    "displayName": "DefaultCurrency",
    "description": "Set default conversion currency"
  },
  "options": {
    "draftAndPublish": true
  },
  "pluginOptions": {},
  "attributes": {
    "currencyCode": {
      "type": "string",
      "required": true,
      "default": "USDT"
    },
    "currencyName": {
      "type": "string",
      "required": true,
      "default": "Tether"
    }
  }
}

I can see the desired result in content-manager page in admin, however my route "default-currency" is not present when checking routes:list. I can assure that controller, services and routes are set the way it was supposed to be set. (I copy pasted it from the docs).

Accessing an endpoint from postman of course gives me 404. Saving and publishing the data in admin is already had been tried.

0

There are 0 answers