From a186ac3d3b2cc0230c3a51051595c9edfef97d4a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Abdo=CC=81n=20Rodri=CC=81guez=20Davila?=
Date: Sat, 17 Mar 2018 16:42:28 +0000
Subject: [PATCH 1/2] Sort types alphabetically
---
packages/strapi-mongoose/lib/utils/index.js | 39 ++++++++++-----------
1 file changed, 19 insertions(+), 20 deletions(-)
diff --git a/packages/strapi-mongoose/lib/utils/index.js b/packages/strapi-mongoose/lib/utils/index.js
index a915585f3d..6c341f5227 100755
--- a/packages/strapi-mongoose/lib/utils/index.js
+++ b/packages/strapi-mongoose/lib/utils/index.js
@@ -19,32 +19,31 @@ module.exports = mongoose => {
return {
convertType: mongooseType => {
switch (mongooseType.toLowerCase()) {
- case 'string':
- case 'password':
- case 'text':
- case 'email':
- return 'String';
- case 'integer':
- case 'biginteger':
- return 'Number';
- case 'float':
- case 'decimal':
- return 'Float';
- case 'date':
- case 'time':
- case 'datetime':
- case 'timestamp':
- return Date;
case 'boolean':
return 'Boolean';
case 'binary':
return 'Buffer';
- case 'uuid':
- return 'ObjectId';
- case 'enumeration':
- return 'String';
+ case 'date':
+ case 'datetime':
+ case 'time':
+ case 'timestamp':
+ return Date;
+ case 'decimal':
+ case 'float':
+ return 'Float';
case 'json':
return 'Mixed';
+ case 'biginteger':
+ case 'integer':
+ return 'Number';
+ case 'uuid':
+ return 'ObjectId';
+ case 'email':
+ case 'enumeration':
+ case 'password':
+ case 'string':
+ case 'text':
+ return 'String';
default:
}
From 3cd5cff861fb7ae1bfc9d56da9eba173cae61572 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Abdo=CC=81n=20Rodri=CC=81guez=20Davila?=
Date: Sat, 17 Mar 2018 16:43:25 +0000
Subject: [PATCH 2/2] Add Array type
---
packages/strapi-mongoose/lib/utils/index.js | 2 ++
1 file changed, 2 insertions(+)
diff --git a/packages/strapi-mongoose/lib/utils/index.js b/packages/strapi-mongoose/lib/utils/index.js
index 6c341f5227..38c4e0f001 100755
--- a/packages/strapi-mongoose/lib/utils/index.js
+++ b/packages/strapi-mongoose/lib/utils/index.js
@@ -19,6 +19,8 @@ module.exports = mongoose => {
return {
convertType: mongooseType => {
switch (mongooseType.toLowerCase()) {
+ case 'array':
+ return 'Array';
case 'boolean':
return 'Boolean';
case 'binary':