diff --git a/src/api/hackspace/content-types/hackspace/schema.json b/src/api/hackspace/content-types/hackspace/schema.json new file mode 100644 index 0000000..a50e750 --- /dev/null +++ b/src/api/hackspace/content-types/hackspace/schema.json @@ -0,0 +1,37 @@ +{ + "kind": "singleType", + "collectionName": "hackspaces", + "info": { + "singularName": "hackspace", + "pluralName": "hackspaces", + "displayName": "Hackspace", + "description": "" + }, + "options": { + "draftAndPublish": false + }, + "attributes": { + "space": { + "type": "string", + "required": true + }, + "logo": { + "type": "media", + "multiple": false, + "required": true, + "allowedTypes": [ + "images" + ] + }, + "url": { + "type": "string", + "required": true + }, + "contact": { + "type": "component", + "repeatable": false, + "component": "hackspace.contacts", + "required": true + } + } +} diff --git a/src/api/hackspace/controllers/hackspace.ts b/src/api/hackspace/controllers/hackspace.ts new file mode 100644 index 0000000..ca25eaf --- /dev/null +++ b/src/api/hackspace/controllers/hackspace.ts @@ -0,0 +1,7 @@ +/** + * hackspace controller + */ + +import { factories } from '@strapi/strapi' + +export default factories.createCoreController('api::hackspace.hackspace'); diff --git a/src/api/hackspace/routes/hackspace.ts b/src/api/hackspace/routes/hackspace.ts new file mode 100644 index 0000000..5ad6f5a --- /dev/null +++ b/src/api/hackspace/routes/hackspace.ts @@ -0,0 +1,7 @@ +/** + * hackspace router + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreRouter('api::hackspace.hackspace'); diff --git a/src/api/hackspace/services/hackspace.ts b/src/api/hackspace/services/hackspace.ts new file mode 100644 index 0000000..5828ffc --- /dev/null +++ b/src/api/hackspace/services/hackspace.ts @@ -0,0 +1,7 @@ +/** + * hackspace service + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreService('api::hackspace.hackspace'); diff --git a/src/components/hackspace/contacts.json b/src/components/hackspace/contacts.json new file mode 100644 index 0000000..a9e432f --- /dev/null +++ b/src/components/hackspace/contacts.json @@ -0,0 +1,56 @@ +{ + "collectionName": "components_hackspace_contacts", + "info": { + "displayName": "Contacts", + "icon": "discuss", + "description": "" + }, + "options": {}, + "attributes": { + "phone": { + "type": "string" + }, + "sip": { + "type": "string" + }, + "irc": { + "type": "string" + }, + "twitter": { + "type": "string" + }, + "mastodon": { + "type": "string" + }, + "facebook": { + "type": "string" + }, + "identica": { + "type": "string" + }, + "foursquare": { + "type": "string" + }, + "email": { + "type": "string" + }, + "ml": { + "type": "string" + }, + "xmpp": { + "type": "string" + }, + "issue_mail": { + "type": "string" + }, + "gopher": { + "type": "string" + }, + "matrix": { + "type": "string" + }, + "mumble": { + "type": "string" + } + } +}