Skip to content

Commit

Permalink
feat: handles auth with NextAuth
Browse files Browse the repository at this point in the history
  • Loading branch information
ghoshnirmalya committed Aug 27, 2020
1 parent 2a373b9 commit 5ac7fc3
Show file tree
Hide file tree
Showing 21 changed files with 1,058 additions and 289 deletions.
52 changes: 52 additions & 0 deletions backend/app/api/feed/config/routes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"routes": [
{
"method": "GET",
"path": "/feeds",
"handler": "feed.find",
"config": {
"policies": []
}
},
{
"method": "GET",
"path": "/feeds/count",
"handler": "feed.count",
"config": {
"policies": []
}
},
{
"method": "GET",
"path": "/feeds/:id",
"handler": "feed.findOne",
"config": {
"policies": []
}
},
{
"method": "POST",
"path": "/feeds",
"handler": "feed.create",
"config": {
"policies": []
}
},
{
"method": "PUT",
"path": "/feeds/:id",
"handler": "feed.update",
"config": {
"policies": []
}
},
{
"method": "DELETE",
"path": "/feeds/:id",
"handler": "feed.delete",
"config": {
"policies": []
}
}
]
}
8 changes: 8 additions & 0 deletions backend/app/api/feed/controllers/feed.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"use strict";

/**
* Read the documentation (https://strapi.io/documentation/v3.x/concepts/controllers.html#core-controllers)
* to customize this controller
*/

module.exports = {};
8 changes: 8 additions & 0 deletions backend/app/api/feed/models/feed.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"use strict";

/**
* Read the documentation (https://strapi.io/documentation/v3.x/concepts/models.html#lifecycle-hooks)
* to customize this model
*/

module.exports = {};
20 changes: 20 additions & 0 deletions backend/app/api/feed/models/feed.settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"kind": "collectionType",
"collectionName": "feeds",
"info": {
"name": "Feed"
},
"options": {
"increments": true,
"timestamps": true
},
"attributes": {
"body": {
"type": "text"
},
"author": {
"plugin": "users-permissions",
"model": "user"
}
}
}
8 changes: 8 additions & 0 deletions backend/app/api/feed/services/feed.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"use strict";

/**
* Read the documentation (https://strapi.io/documentation/v3.x/concepts/services.html#core-services)
* to customize this service
*/

module.exports = {};
57 changes: 57 additions & 0 deletions backend/app/extensions/users-permissions/models/User.settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"kind": "collectionType",
"collectionName": "users-permissions_user",
"info": {
"name": "user",
"description": ""
},
"options": {
"timestamps": true
},
"attributes": {
"username": {
"type": "string",
"minLength": 3,
"unique": true,
"configurable": false,
"required": true
},
"email": {
"type": "email",
"minLength": 6,
"configurable": false,
"required": true
},
"provider": {
"type": "string",
"configurable": false
},
"password": {
"type": "password",
"minLength": 6,
"configurable": false,
"private": true
},
"resetPasswordToken": {
"type": "string",
"configurable": false,
"private": true
},
"confirmed": {
"type": "boolean",
"default": false,
"configurable": false
},
"blocked": {
"type": "boolean",
"default": false,
"configurable": false
},
"role": {
"model": "role",
"via": "users",
"plugin": "users-permissions",
"configurable": false
}
}
}
13 changes: 7 additions & 6 deletions backend/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,18 @@
},
"devDependencies": {},
"dependencies": {
"knex": "<0.20.0",
"pg": "latest",
"strapi": "3.1.4",
"strapi-admin": "3.1.4",
"strapi-utils": "3.1.4",
"strapi-plugin-content-type-builder": "3.1.4",
"strapi-connector-bookshelf": "3.1.4",
"strapi-plugin-content-manager": "3.1.4",
"strapi-plugin-users-permissions": "3.1.4",
"strapi-plugin-content-type-builder": "3.1.4",
"strapi-plugin-email": "3.1.4",
"strapi-plugin-graphql": "3.1.4",
"strapi-plugin-upload": "3.1.4",
"strapi-connector-bookshelf": "3.1.4",
"knex": "<0.20.0",
"pg": "latest"
"strapi-plugin-users-permissions": "3.1.4",
"strapi-utils": "3.1.4"
},
"author": {
"name": "A Strapi developer"
Expand Down
Loading

0 comments on commit 5ac7fc3

Please sign in to comment.