-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: soupette <cyril.lpz@gmail.com>
- Loading branch information
Showing
5 changed files
with
141 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"routes": [ | ||
{ | ||
"method": "GET", | ||
"path": "/soups", | ||
"handler": "soup.find", | ||
"config": { | ||
"policies": [] | ||
} | ||
}, | ||
{ | ||
"method": "GET", | ||
"path": "/soups/count", | ||
"handler": "soup.count", | ||
"config": { | ||
"policies": [] | ||
} | ||
}, | ||
{ | ||
"method": "GET", | ||
"path": "/soups/:id", | ||
"handler": "soup.findOne", | ||
"config": { | ||
"policies": [] | ||
} | ||
}, | ||
{ | ||
"method": "POST", | ||
"path": "/soups", | ||
"handler": "soup.create", | ||
"config": { | ||
"policies": [] | ||
} | ||
}, | ||
{ | ||
"method": "PUT", | ||
"path": "/soups/:id", | ||
"handler": "soup.update", | ||
"config": { | ||
"policies": [] | ||
} | ||
}, | ||
{ | ||
"method": "DELETE", | ||
"path": "/soups/:id", | ||
"handler": "soup.delete", | ||
"config": { | ||
"policies": [] | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
'use strict'; | ||
|
||
/** | ||
* Read the documentation (https://strapi.io/documentation/3.0.0-beta.x/concepts/controllers.html#core-controllers) | ||
* to customize this controller | ||
*/ | ||
|
||
module.exports = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
'use strict'; | ||
|
||
/** | ||
* Lifecycle callbacks for the `soup` model. | ||
*/ | ||
|
||
module.exports = { | ||
// Before saving a value. | ||
// Fired before an `insert` or `update` query. | ||
// beforeSave: async (model, attrs, options) => {}, | ||
// After saving a value. | ||
// Fired after an `insert` or `update` query. | ||
// afterSave: async (model, response, options) => {}, | ||
// Before fetching a value. | ||
// Fired before a `fetch` operation. | ||
// beforeFetch: async (model, columns, options) => {}, | ||
// After fetching a value. | ||
// Fired after a `fetch` operation. | ||
// afterFetch: async (model, response, options) => {}, | ||
// Before fetching all values. | ||
// Fired before a `fetchAll` operation. | ||
// beforeFetchAll: async (model, columns, options) => {}, | ||
// After fetching all values. | ||
// Fired after a `fetchAll` operation. | ||
// afterFetchAll: async (model, response, options) => {}, | ||
// Before creating a value. | ||
// Fired before an `insert` query. | ||
// beforeCreate: async (model, attrs, options) => {}, | ||
// After creating a value. | ||
// Fired after an `insert` query. | ||
// afterCreate: async (model, attrs, options) => {}, | ||
// Before updating a value. | ||
// Fired before an `update` query. | ||
// beforeUpdate: async (model, attrs, options) => {}, | ||
// After updating a value. | ||
// Fired after an `update` query. | ||
// afterUpdate: async (model, attrs, options) => {}, | ||
// Before destroying a value. | ||
// Fired before a `delete` query. | ||
// beforeDestroy: async (model, attrs, options) => {}, | ||
// After destroying a value. | ||
// Fired after a `delete` query. | ||
// afterDestroy: async (model, attrs, options) => {} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"kind": "collectionType", | ||
"connection": "default", | ||
"collectionName": "soups", | ||
"info": { | ||
"name": "soup" | ||
}, | ||
"options": { | ||
"increments": true, | ||
"timestamps": true | ||
}, | ||
"attributes": { | ||
"name": { | ||
"type": "string" | ||
}, | ||
"multiple": { | ||
"collection": "file", | ||
"via": "related", | ||
"plugin": "upload", | ||
"required": false | ||
}, | ||
"single": { | ||
"model": "file", | ||
"via": "related", | ||
"plugin": "upload", | ||
"required": false | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
'use strict'; | ||
|
||
/** | ||
* Read the documentation (https://strapi.io/documentation/3.0.0-beta.x/concepts/services.html#core-services) | ||
* to customize this service | ||
*/ | ||
|
||
module.exports = {}; |