Skip to content

Instantly share code, notes, and snippets.

@GalloDaSballo
Created June 5, 2019 13:55
Show Gist options
  • Save GalloDaSballo/55444e9d14652105336470b542627d8a to your computer and use it in GitHub Desktop.
Save GalloDaSballo/55444e9d14652105336470b542627d8a to your computer and use it in GitHub Desktop.
{
"routes": [
{
"method": "GET",
"path": "/orders",
"handler": "Order.find",
"config": {
"policies": [
"global.isAuthenticated",
"global.targetUserIsLoggedInUser"
]
}
},
{
"method": "GET",
"path": "/orders/count",
"handler": "Order.count",
"config": {
"policies": [
"global.isAuthenticated",
"global.targetUserIsLoggedInUser"
]
}
},
{
"method": "GET",
"path": "/orders/:_id",
"handler": "Order.findOne",
"config": {
"policies": [
"global.isAuthenticated",
"global.targetUserIsLoggedInUser"
]
}
},
{
"method": "POST",
"path": "/orders",
"handler": "Order.create",
"config": {
"policies": [
"global.isAuthenticated"
]
}
},
{
"method": "PUT",
"path": "/orders/:_id",
"handler": "Order.update",
"config": {
"policies": [
"global.isAuthenticated",
"global.targetUserIsLoggedInUser"
]
}
},
{
"method": "DELETE",
"path": "/orders/:_id",
"handler": "Order.destroy",
"config": {
"policies": [
"global.isAuthenticated",
"global.targetUserIsLoggedInUser"
]
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment