Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ Please refer to [router documentation](../concepts/routing.md) for information.

**Route prefix**

Each route of a plugin is prefixed by the name of the plugin (eg: `/my-plugin/my-plugin-route`).

To disable the prefix, add the `prefix` attribute to each concerned route, like below:
Each route of a plugin is prefixed by the name of the plugin (eg: `/my-plugin/my-plugin-route`). Using the `prefix` key you can change this option to something custom. You can disable the prefix, by setting the `config.prefix` key to an empty string.

```json
{
Expand All @@ -23,7 +21,7 @@ To disable the prefix, add the `prefix` attribute to each concerned route, like
"handler": "MyPlugin.action",
"config": {
"policies": [],
"prefix": false
"prefix": "my-custom-prefix"
}
}
```
Expand Down Expand Up @@ -52,7 +50,7 @@ You already have `User` model defining in your `./api/user/models/User.settings.

```js
module.exports = {
findUser: async function(params) {
findUser: async function (params) {
// This `User` global variable will always make a reference the User model defining in your `./api/xxx/models/User.settings.json`.
return await User.find();
},
Expand Down