diff options
| author | Valentin Popov <valentin@popov.link> | 2026-02-05 13:19:56 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-02-05 13:19:56 +0300 |
| commit | efa89313fa4152252b477aafd88f7cf4a66747d8 (patch) | |
| tree | 5939b251fe1bbc6bea3881a71154cabd3aa538ec /playground/src/api/global | |
| parent | f6de8611955bf382612996500efba21a2d64ea1f (diff) | |
| download | strapi-plugin-checkbox-list-efa89313fa4152252b477aafd88f7cf4a66747d8.tar.xz strapi-plugin-checkbox-list-efa89313fa4152252b477aafd88f7cf4a66747d8.zip | |
Initial Strapi plugin project
Diffstat (limited to 'playground/src/api/global')
| -rw-r--r-- | playground/src/api/global/content-types/global/schema.json | 35 | ||||
| -rw-r--r-- | playground/src/api/global/controllers/global.ts | 7 | ||||
| -rw-r--r-- | playground/src/api/global/routes/global.ts | 7 | ||||
| -rw-r--r-- | playground/src/api/global/services/global.ts | 7 |
4 files changed, 56 insertions, 0 deletions
diff --git a/playground/src/api/global/content-types/global/schema.json b/playground/src/api/global/content-types/global/schema.json new file mode 100644 index 0000000..3daa1e8 --- /dev/null +++ b/playground/src/api/global/content-types/global/schema.json @@ -0,0 +1,35 @@ +{ + "kind": "singleType", + "collectionName": "globals", + "info": { + "singularName": "global", + "pluralName": "globals", + "displayName": "Global", + "description": "Define global settings" + }, + "options": { + "draftAndPublish": false + }, + "pluginOptions": {}, + "attributes": { + "siteName": { + "type": "string", + "required": true + }, + "favicon": { + "type": "media", + "multiple": false, + "required": false, + "allowedTypes": ["images", "files", "videos"] + }, + "siteDescription": { + "type": "text", + "required": true + }, + "defaultSeo": { + "type": "component", + "repeatable": false, + "component": "shared.seo" + } + } +} diff --git a/playground/src/api/global/controllers/global.ts b/playground/src/api/global/controllers/global.ts new file mode 100644 index 0000000..ead6ee0 --- /dev/null +++ b/playground/src/api/global/controllers/global.ts @@ -0,0 +1,7 @@ +/** + * global controller + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreController('api::global.global'); diff --git a/playground/src/api/global/routes/global.ts b/playground/src/api/global/routes/global.ts new file mode 100644 index 0000000..047b3b7 --- /dev/null +++ b/playground/src/api/global/routes/global.ts @@ -0,0 +1,7 @@ +/** + * global router. + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreRouter('api::global.global'); diff --git a/playground/src/api/global/services/global.ts b/playground/src/api/global/services/global.ts new file mode 100644 index 0000000..ef21df8 --- /dev/null +++ b/playground/src/api/global/services/global.ts @@ -0,0 +1,7 @@ +/** + * global service. + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreService('api::global.global'); |
