diff options
| author | Sean Fridman <fridman@mail.sfsu.edu> | 2015-04-08 19:52:04 -0400 |
|---|---|---|
| committer | Sean Fridman <fridman@mail.sfsu.edu> | 2015-04-08 19:52:04 -0400 |
| commit | 47215a88acb2b4a612b6916f2f7b7a7660770c36 (patch) | |
| tree | 602f442d5193882721df0865fc3c224539af9470 /examples/index.js | |
| parent | 5f3d47c4bea9c94152a8243c304ee0f43e84ac07 (diff) | |
Update example
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'} } } |
