@thinkmill/keystone-mosql-yaml-gen
Advanced tools
Comparing version 2.0.1 to 2.0.2
28
index.js
@@ -6,16 +6,16 @@ 'use strict'; | ||
const typeMap = new Map([ | ||
[ 'datetime', 'timestamp' ], | ||
[ 'number', 'numeric' ], | ||
[ 'relationship', 'text' ], | ||
[ 'select', 'text' ], | ||
[ 'text', 'text' ], | ||
[ 'boolean', 'boolean' ], | ||
[ 'code', 'text' ], | ||
[ 'email', 'text' ], | ||
[ 'html', 'text' ], | ||
[ 'markdown', 'text' ], | ||
[ 'textarea', 'text' ], | ||
[ 'money', 'numeric' ], // 'numeric(20, 4)' would be better? | ||
[ 'geopoint', 'double precision array' ], | ||
[ 'textarray', 'text array' ], | ||
['datetime', 'timestamp'], | ||
['number', 'numeric'], | ||
['relationship', 'text'], | ||
['select', 'text'], | ||
['text', 'text'], | ||
['boolean', 'boolean'], | ||
['code', 'text'], | ||
['email', 'text'], | ||
['html', 'text'], | ||
['markdown', 'text'], | ||
['textarea', 'text'], | ||
['money', 'numeric'], // 'numeric(20, 4)' would be better? | ||
['geopoint', 'double precision array'], | ||
['textarray', 'text array'], | ||
]); | ||
@@ -22,0 +22,0 @@ |
{ | ||
"name": "@thinkmill/keystone-mosql-yaml-gen", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "A basic and somewhat crappy generator of a MoSQL YAML config from KeystoneJS models", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -26,3 +26,3 @@ MoSQL Yaml Generator for Keystone | ||
```javascript | ||
app.get('/api/keystoneListsYaml', bsMiddleware.restrictWithUserFlag('isAdmin'), mosqlYaml.createMosqlYamlEndpoint(keystone)); | ||
app.get('/api/keystoneListsYaml', bsMiddleware.buildUserFlagValidator('isAdmin'), mosqlYaml.createMosqlYamlEndpoint(keystone)); | ||
``` | ||
@@ -29,0 +29,0 @@ Here we've use the [blueshyft middleware package](https://www.npmjs.com/package/@thinkmill/blueshyft-middleware) to restrict access to admins. |
7821