diff --git a/loopback-blog/common/models/author.js b/loopback-blog/common/models/author.js new file mode 100644 index 0000000..847e6b3 --- /dev/null +++ b/loopback-blog/common/models/author.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function(Author) { + +}; diff --git a/loopback-blog/common/models/author.json b/loopback-blog/common/models/author.json new file mode 100644 index 0000000..29d16c2 --- /dev/null +++ b/loopback-blog/common/models/author.json @@ -0,0 +1,23 @@ +{ + "name": "Author", + "plural": "authors", + "base": "PersistedModel", + "idInjection": true, + "options": { + "validateUpsert": true + }, + "properties": { + "name": { + "type": "string", + "required": true + }, + "email": { + "type": "string", + "required": true + } + }, + "validations": [], + "relations": {}, + "acls": [], + "methods": {} +} diff --git a/loopback-blog/server/middleware.json b/loopback-blog/server/middleware.json index fbfff81..cde21fe 100644 --- a/loopback-blog/server/middleware.json +++ b/loopback-blog/server/middleware.json @@ -15,7 +15,7 @@ "helmet#frameguard": { "params": [ "deny" - ] + ] }, "helmet#hsts": { "params": { diff --git a/loopback-blog/server/model-config.json b/loopback-blog/server/model-config.json index 56f6800..c3f761d 100644 --- a/loopback-blog/server/model-config.json +++ b/loopback-blog/server/model-config.json @@ -12,5 +12,9 @@ "../common/mixins", "./mixins" ] + }, + "Author": { + "dataSource": null, + "public": true } }