Skip to content

Commit

Permalink
Merge branch 'develop' into feature/groups
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandrebodin committed Jul 15, 2019
2 parents b49e5a5 + 7dbd0d7 commit 63a6452
Show file tree
Hide file tree
Showing 235 changed files with 11,258 additions and 2,387 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
**/build/**
**/dist/**
testApp/**
.eslintrc.js
5 changes: 4 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ module.exports = {
'eslint:recommended',
'plugin:react/recommended',
'plugin:redux-saga/recommended',

'prettier',
],
plugins: ['react', 'redux-saga'],
plugins: ['react', 'redux-saga', 'react-hooks'],
env: {
browser: true,
commonjs: true,
Expand Down Expand Up @@ -41,6 +42,8 @@ module.exports = {
rules: {
'generator-star-spacing': 0,
'no-console': 0,
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
},
settings: {
react: {
Expand Down
4 changes: 4 additions & 0 deletions examples/getstarted/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# getstarted

A quick description of getstarted.

Start the app with mongo

`DB=mongo yarn develop`
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,50 @@
{
"method": "GET",
"path": "/articles",
"handler": "Articles.find",
"handler": "Article.find",
"config": {
"policies": []
}
},
{
"method": "GET",
"path": "/articles/count",
"handler": "Articles.count",
"handler": "Article.count",
"config": {
"policies": []
}
},
{
"method": "GET",
"path": "/articles/:id",
"handler": "Articles.findOne",
"handler": "Article.findOne",
"config": {
"policies": []
}
},
{
"method": "POST",
"path": "/articles",
"handler": "Articles.create",
"handler": "Article.create",
"config": {
"policies": []
}
},
{
"method": "PUT",
"path": "/articles/:id",
"handler": "Articles.update",
"handler": "Article.update",
"config": {
"policies": []
}
},
{
"method": "DELETE",
"path": "/articles/:id",
"handler": "Articles.delete",
"handler": "Article.delete",
"config": {
"policies": []
}
}
]
}
}
8 changes: 8 additions & 0 deletions examples/getstarted/api/article/controllers/Article.js
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/guides/controllers.html#core-controllers)
* to customize this controller
*/

module.exports = {};
Original file line number Diff line number Diff line change
@@ -1,54 +1,55 @@
'use strict';

/**
* Lifecycle callbacks for the `Post` model.
* Lifecycle callbacks for the `Article` model.
*/

module.exports = {
// Before saving a value.
// Fired before an `insert` or `update` query.
// beforeSave: async (model) => {},
// beforeSave: async (model, attrs, options) => {},

// After saving a value.
// Fired after an `insert` or `update` query.
// afterSave: async (model, result) => {},
// 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) => {},
// beforeFetchAll: async (model, columns, options) => {},

// After fetching all values.
// Fired after a `fetchAll` operation.
// afterFetchAll: async (model, results) => {},

// Fired before a `fetch` operation.
// beforeFetch: async (model) => {},

// After fetching a value.
// Fired after a `fetch` operation.
// afterFetch: async (model, result) => {},
// afterFetchAll: async (model, response, options) => {},

// Before creating a value.
// Fired before an `insert` query.
// beforeCreate: async (model) => {},
// beforeCreate: async (model, attrs, options) => {},

// After creating a value.
// Fired after an `insert` query.
// afterCreate: async (model, result) => {},
// afterCreate: async (model, attrs, options) => {},

// Before updating a value.
// Fired before an `update` query.
// beforeUpdate: async (model) => {},
// beforeUpdate: async (model, attrs, options) => {},

// After updating a value.
// Fired after an `update` query.
// afterUpdate: async (model, result) => {},
// afterUpdate: async (model, attrs, options) => {},

// Before destroying a value.
// Fired before a `delete` query.
// beforeDestroy: async (model) => {},
// beforeDestroy: async (model, attrs, options) => {},

// After destroying a value.
// Fired after a `delete` query.
// afterDestroy: async (model, result) => {}
// afterDestroy: async (model, attrs, options) => {}
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"connection": "default",
"collectionName": "articles",
"info": {
"name": "articles",
"name": "article",
"description": ""
},
"options": {
Expand All @@ -23,7 +23,23 @@
"value": {
"type": "integer"
},
"image": {
"json": {
"type": "string"
},
"number": {
"type": "integer"
},
"date": {
"type": "date"
},
"enum": {
"type": "enumeration",
"enum": ["morning,", "noon"]
},
"bool": {
"type": "boolean"
},
"pic": {
"model": "file",
"via": "related",
"plugin": "upload"
Expand Down Expand Up @@ -56,6 +72,10 @@
"repeatable": true,
"min": 1,
"max": 10
},
"tags": {
"collection": "tag",
"via": "articles"
}
}
}
8 changes: 8 additions & 0 deletions examples/getstarted/api/article/services/Article.js
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/guides/services.html#core-services)
* to customize this service
*/

module.exports = {};
7 changes: 0 additions & 7 deletions examples/getstarted/api/articles/services/Articles.js

This file was deleted.

7 changes: 0 additions & 7 deletions examples/getstarted/api/post/controllers/Post.js

This file was deleted.

7 changes: 0 additions & 7 deletions examples/getstarted/api/post/services/Post.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,48 @@
"routes": [
{
"method": "GET",
"path": "/posts",
"handler": "Post.find",
"path": "/tags",
"handler": "Tag.find",
"config": {
"policies": []
}
},
{
"method": "GET",
"path": "/posts/count",
"handler": "Post.count",
"path": "/tags/count",
"handler": "Tag.count",
"config": {
"policies": []
}
},
{
"method": "GET",
"path": "/posts/:_id",
"handler": "Post.findOne",
"path": "/tags/:id",
"handler": "Tag.findOne",
"config": {
"policies": []
}
},
{
"method": "POST",
"path": "/posts",
"handler": "Post.create",
"path": "/tags",
"handler": "Tag.create",
"config": {
"policies": []
}
},
{
"method": "PUT",
"path": "/posts/:_id",
"handler": "Post.update",
"path": "/tags/:id",
"handler": "Tag.update",
"config": {
"policies": []
}
},
{
"method": "DELETE",
"path": "/posts/:_id",
"handler": "Post.delete",
"path": "/tags/:id",
"handler": "Tag.delete",
"config": {
"policies": []
}
Expand Down
8 changes: 8 additions & 0 deletions examples/getstarted/api/tag/controllers/Tag.js
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/guides/controllers.html#core-controllers)
* to customize this controller
*/

module.exports = {};
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

/**
* Lifecycle callbacks for the `Test` model.
* Lifecycle callbacks for the `Tag` model.
*/

module.exports = {
Expand Down
8 changes: 8 additions & 0 deletions examples/getstarted/api/tag/services/Tag.js
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/guides/services.html#core-services)
* to customize this service
*/

module.exports = {};
Loading

0 comments on commit 63a6452

Please sign in to comment.