change index definition

This commit is contained in:
Peter Clement 2021-08-27 14:10:19 +01:00
parent ee830d0e85
commit e03244e44e
2 changed files with 2 additions and 2 deletions

View File

@ -66,7 +66,7 @@ exports.validate = async ({ appId, tableId, row, table }) => {
} }
let res let res
// Validate.js doesn't seem to handle array of array very well // Validate.js doesn't seem to handle array
if (table.schema[fieldName].type === FieldTypes.ARRAY) { if (table.schema[fieldName].type === FieldTypes.ARRAY) {
row[fieldName].map(val => { row[fieldName].map(val => {
if (!constraints.inclusion.includes(val)) { if (!constraints.inclusion.includes(val)) {

View File

@ -102,7 +102,7 @@ exports.createAllSearchIndex = async appId => {
if (Array.isArray(input[key])) { if (Array.isArray(input[key])) {
for (let val in input[key]) { for (let val in input[key]) {
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
index(`${idxKey}`, input[key][val], { index(idxKey, input[key][val], {
store: true, store: true,
}) })
} }