diff options
Diffstat (limited to 'examples/index.js')
| -rw-r--r-- | examples/index.js | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/examples/index.js b/examples/index.js index c4fd3be..e55b717 100644 --- a/examples/index.js +++ b/examples/index.js @@ -6,29 +6,26 @@ var app = okcms.createApp({ schemas: { page: { - title: {type: 'string', id: true}, + id: {type: 'string'}, + title: {type: 'string'}, body: {type: 'string'} }, - project: { - title: {type: 'string', id: true}, - index: {type: 'integer'}, - category: {type: 'enum'}, - body: {type: 'string'}, - videos: [{type: 'uri'}], - images: [{index: {type: 'string'}, uri: {type: 'uri'}}] + bread: { + type: {type: 'string', id: true}, + description: {type: 'string'} } }, resources: [ - { type: 'page', data: {title: 'about'}}, - { type: 'page', data: {title: 'contact'}}, - { type: 'project' }, + { type: 'page', static: {id: 'about'}}, + { type: 'page', static: {id: 'contact'}}, + { type: 'bread' }, ], views: { '/': { data: [ - {type: 'project', query: '*'}, + {type: 'bread', query: '*'}, {type: 'page', query: '*'} ] }, @@ -39,7 +36,7 @@ var app = okcms.createApp({ data: {type: 'page', query: 'contact'} }, '/:id': { - data: {type: 'project', query: ':id'} + data: {type: 'bread', query: ':id'} } } |
