diff --git a/modules/hudozka-strapi-api/api/page/config/routes.json b/modules/hudozka-strapi-api/api/page/config/routes.json new file mode 100644 index 00000000..2883bc90 --- /dev/null +++ b/modules/hudozka-strapi-api/api/page/config/routes.json @@ -0,0 +1,52 @@ +{ + "routes": [ + { + "method": "GET", + "path": "/pages", + "handler": "page.find", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/pages/count", + "handler": "page.count", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/pages/:id", + "handler": "page.findOne", + "config": { + "policies": [] + } + }, + { + "method": "POST", + "path": "/pages", + "handler": "page.create", + "config": { + "policies": [] + } + }, + { + "method": "PUT", + "path": "/pages/:id", + "handler": "page.update", + "config": { + "policies": [] + } + }, + { + "method": "DELETE", + "path": "/pages/:id", + "handler": "page.delete", + "config": { + "policies": [] + } + } + ] +} diff --git a/modules/hudozka-strapi-api/api/page/controllers/page.js b/modules/hudozka-strapi-api/api/page/controllers/page.js new file mode 100644 index 00000000..556f4fce --- /dev/null +++ b/modules/hudozka-strapi-api/api/page/controllers/page.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/controllers.html#core-controllers) + * to customize this controller + */ + +module.exports = {}; diff --git a/modules/hudozka-strapi-api/api/page/models/page.js b/modules/hudozka-strapi-api/api/page/models/page.js new file mode 100644 index 00000000..dd847efd --- /dev/null +++ b/modules/hudozka-strapi-api/api/page/models/page.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/models.html#lifecycle-hooks) + * to customize this model + */ + +module.exports = {}; diff --git a/modules/hudozka-strapi-api/api/page/models/page.settings.json b/modules/hudozka-strapi-api/api/page/models/page.settings.json new file mode 100644 index 00000000..a987216c --- /dev/null +++ b/modules/hudozka-strapi-api/api/page/models/page.settings.json @@ -0,0 +1,43 @@ +{ + "kind": "collectionType", + "collectionName": "pages", + "info": { + "name": "Page", + "description": "" + }, + "options": { + "increments": true, + "timestamps": true, + "draftAndPublish": true + }, + "attributes": { + "title": { + "type": "string" + }, + "excerpt": { + "type": "text" + }, + "cover": { + "model": "file", + "via": "related", + "allowedTypes": [ + "images" + ], + "plugin": "upload", + "required": false + }, + "content": { + "type": "dynamiczone", + "components": [ + "hudozka.document", + "hudozka.image", + "hudozka.text", + "hudozka.embed" + ] + }, + "tags": { + "collection": "tag", + "via": "page" + } + } +} diff --git a/modules/hudozka-strapi-api/api/page/services/page.js b/modules/hudozka-strapi-api/api/page/services/page.js new file mode 100644 index 00000000..6bc4168d --- /dev/null +++ b/modules/hudozka-strapi-api/api/page/services/page.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/services.html#core-services) + * to customize this service + */ + +module.exports = {}; diff --git a/modules/hudozka-strapi-api/api/tag/config/routes.json b/modules/hudozka-strapi-api/api/tag/config/routes.json new file mode 100644 index 00000000..b8130514 --- /dev/null +++ b/modules/hudozka-strapi-api/api/tag/config/routes.json @@ -0,0 +1,52 @@ +{ + "routes": [ + { + "method": "GET", + "path": "/tags", + "handler": "tag.find", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/tags/count", + "handler": "tag.count", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/tags/:id", + "handler": "tag.findOne", + "config": { + "policies": [] + } + }, + { + "method": "POST", + "path": "/tags", + "handler": "tag.create", + "config": { + "policies": [] + } + }, + { + "method": "PUT", + "path": "/tags/:id", + "handler": "tag.update", + "config": { + "policies": [] + } + }, + { + "method": "DELETE", + "path": "/tags/:id", + "handler": "tag.delete", + "config": { + "policies": [] + } + } + ] +} diff --git a/modules/hudozka-strapi-api/api/tag/controllers/tag.js b/modules/hudozka-strapi-api/api/tag/controllers/tag.js new file mode 100644 index 00000000..556f4fce --- /dev/null +++ b/modules/hudozka-strapi-api/api/tag/controllers/tag.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/controllers.html#core-controllers) + * to customize this controller + */ + +module.exports = {}; diff --git a/modules/hudozka-strapi-api/api/tag/models/tag.js b/modules/hudozka-strapi-api/api/tag/models/tag.js new file mode 100644 index 00000000..dd847efd --- /dev/null +++ b/modules/hudozka-strapi-api/api/tag/models/tag.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/models.html#lifecycle-hooks) + * to customize this model + */ + +module.exports = {}; diff --git a/modules/hudozka-strapi-api/api/tag/models/tag.settings.json b/modules/hudozka-strapi-api/api/tag/models/tag.settings.json new file mode 100644 index 00000000..efce58e9 --- /dev/null +++ b/modules/hudozka-strapi-api/api/tag/models/tag.settings.json @@ -0,0 +1,27 @@ +{ + "kind": "collectionType", + "collectionName": "tags", + "info": { + "name": "Tag" + }, + "options": { + "increments": true, + "timestamps": true, + "draftAndPublish": false + }, + "attributes": { + "slug": { + "type": "string", + "required": true, + "unique": true, + "minLength": 3 + }, + "name": { + "type": "string" + }, + "page": { + "via": "tags", + "model": "page" + } + } +} diff --git a/modules/hudozka-strapi-api/api/tag/services/tag.js b/modules/hudozka-strapi-api/api/tag/services/tag.js new file mode 100644 index 00000000..6bc4168d --- /dev/null +++ b/modules/hudozka-strapi-api/api/tag/services/tag.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/services.html#core-services) + * to customize this service + */ + +module.exports = {}; diff --git a/modules/hudozka-strapi-api/components/hudozka/document.json b/modules/hudozka-strapi-api/components/hudozka/document.json new file mode 100644 index 00000000..30466161 --- /dev/null +++ b/modules/hudozka-strapi-api/components/hudozka/document.json @@ -0,0 +1,22 @@ +{ + "collectionName": "components_hudozka_documents", + "info": { + "name": "Document", + "icon": "file" + }, + "options": {}, + "attributes": { + "media": { + "model": "file", + "via": "related", + "allowedTypes": [ + "files" + ], + "plugin": "upload", + "required": false + }, + "title": { + "type": "string" + } + } +} diff --git a/modules/hudozka-strapi-api/components/hudozka/embed.json b/modules/hudozka-strapi-api/components/hudozka/embed.json new file mode 100644 index 00000000..062d65a4 --- /dev/null +++ b/modules/hudozka-strapi-api/components/hudozka/embed.json @@ -0,0 +1,14 @@ +{ + "collectionName": "components_hudozka_embeds", + "info": { + "name": "Embed", + "icon": "vial" + }, + "options": {}, + "attributes": { + "src": { + "type": "string", + "required": true + } + } +} diff --git a/modules/hudozka-strapi-api/components/hudozka/image.json b/modules/hudozka-strapi-api/components/hudozka/image.json new file mode 100644 index 00000000..fadaf23d --- /dev/null +++ b/modules/hudozka-strapi-api/components/hudozka/image.json @@ -0,0 +1,23 @@ +{ + "collectionName": "components_hudozka_images", + "info": { + "name": "Image", + "icon": "image" + }, + "options": {}, + "attributes": { + "media": { + "model": "file", + "via": "related", + "allowedTypes": [ + "images" + ], + "plugin": "upload", + "required": true + }, + "wide": { + "type": "boolean", + "default": false + } + } +} diff --git a/modules/hudozka-strapi-api/components/hudozka/text.json b/modules/hudozka-strapi-api/components/hudozka/text.json new file mode 100644 index 00000000..a53323cb --- /dev/null +++ b/modules/hudozka-strapi-api/components/hudozka/text.json @@ -0,0 +1,14 @@ +{ + "collectionName": "components_hudozka_texts", + "info": { + "name": "Text", + "icon": "candy-cane" + }, + "options": {}, + "attributes": { + "text": { + "type": "richtext", + "required": true + } + } +}