diff --git a/package.json b/package.json index 4acbc8e..d199514 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tabbled-server", - "version": "0.3.7", + "version": "0.3.8", "public": true, "license": "MIT", "scripts": { diff --git a/src/data-indexer/data-indexer.ts b/src/data-indexer/data-indexer.ts index 14e43c6..c6133f9 100644 --- a/src/data-indexer/data-indexer.ts +++ b/src/data-indexer/data-indexer.ts @@ -181,7 +181,7 @@ export class DataIndexer { } public async dataReindex(params: DataReindexDto, context: Context) : Promise { - let adapter: IndexerDataAdapter = this.getAdapter(params.dataSourceConfig.type) + let adapter: IndexerDataAdapter = this.getAdapter(params.dataSourceConfig.type) if (!adapter) throw `DataSource has no ability to index` @@ -280,6 +280,7 @@ export class DataIndexer { continue } + //TODO This is not support multiple field type for(let j in items) { items[j][field.alias] = await this.replaceLinkedDataToItem(items[j][field.alias], index, fields) } @@ -306,7 +307,7 @@ export class DataIndexer { } else { - this.logger.warn(`Item id must be a type of string`) + this.logger.warn(`Item id must be a type of string, current type is ${typeof id}, may by field is multiple?`) return { id: id } diff --git a/src/datasources/datasourceV2.service.ts b/src/datasources/datasourceV2.service.ts index c44789f..0d97d8e 100644 --- a/src/datasources/datasourceV2.service.ts +++ b/src/datasources/datasourceV2.service.ts @@ -296,7 +296,7 @@ export class DataSourceV2Service { .values(d) .orUpdate(['type', 'title', 'searchable', 'filterable', 'sortable', 'is_multiple','default_value', 'datasource_ref', - 'autoincrement', 'required', 'enum_values', 'precision', + 'autoincrement', 'nullable', 'enum_values', 'precision', 'format', 'updated_by', 'updated_at', 'deleted_at', 'deleted_by', 'version'], ['account_id', 'datasource_alias', 'alias']) @@ -698,6 +698,7 @@ export class DataSourceV2Service { @OnEvent('config-update.datasource.*', {async: true}) async handleDataSourceConfigUpdate(data) { + console.log('config-update.datasource.*') let queryRunner = this.datasource.createQueryRunner() await queryRunner.startTransaction() @@ -706,6 +707,7 @@ export class DataSourceV2Service { await this.updateDatasourceFromV1(queryRunner, data.item, data.context) await queryRunner.commitTransaction() } catch (e) { + console.log(e) await queryRunner.rollbackTransaction() throw e } finally {