mirror of
https://github.com/He4eT/simple-spaceapi.git
synced 2026-05-05 01:47:24 +00:00
Hackspace: init
This commit is contained in:
parent
fab7c1eb05
commit
32b6f612c2
5 changed files with 114 additions and 0 deletions
37
src/api/hackspace/content-types/hackspace/schema.json
Normal file
37
src/api/hackspace/content-types/hackspace/schema.json
Normal file
|
|
@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
7
src/api/hackspace/controllers/hackspace.ts
Normal file
7
src/api/hackspace/controllers/hackspace.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
/**
|
||||||
|
* hackspace controller
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { factories } from '@strapi/strapi'
|
||||||
|
|
||||||
|
export default factories.createCoreController('api::hackspace.hackspace');
|
||||||
7
src/api/hackspace/routes/hackspace.ts
Normal file
7
src/api/hackspace/routes/hackspace.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
/**
|
||||||
|
* hackspace router
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { factories } from '@strapi/strapi';
|
||||||
|
|
||||||
|
export default factories.createCoreRouter('api::hackspace.hackspace');
|
||||||
7
src/api/hackspace/services/hackspace.ts
Normal file
7
src/api/hackspace/services/hackspace.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
/**
|
||||||
|
* hackspace service
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { factories } from '@strapi/strapi';
|
||||||
|
|
||||||
|
export default factories.createCoreService('api::hackspace.hackspace');
|
||||||
56
src/components/hackspace/contacts.json
Normal file
56
src/components/hackspace/contacts.json
Normal file
|
|
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue