summaryrefslogtreecommitdiff
path: root/playground/src/api/global
diff options
context:
space:
mode:
Diffstat (limited to 'playground/src/api/global')
-rw-r--r--playground/src/api/global/content-types/global/schema.json35
-rw-r--r--playground/src/api/global/controllers/global.ts7
-rw-r--r--playground/src/api/global/routes/global.ts7
-rw-r--r--playground/src/api/global/services/global.ts7
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');