From 49fcb550c2f9e88259971ffc7eee8fb569daee1d Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Mon, 13 Mar 2023 14:03:47 +0800 Subject: [PATCH] refactor(nocodb): return update fn --- packages/nocodb/src/lib/models/FormViewColumn.ts | 2 +- packages/nocodb/src/lib/models/GridViewColumn.ts | 2 +- packages/nocodb/src/lib/services/views/galleryView.svc.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/nocodb/src/lib/models/FormViewColumn.ts b/packages/nocodb/src/lib/models/FormViewColumn.ts index c516d6ae45..462b2216f1 100644 --- a/packages/nocodb/src/lib/models/FormViewColumn.ts +++ b/packages/nocodb/src/lib/models/FormViewColumn.ts @@ -182,7 +182,7 @@ export default class FormViewColumn implements FormColumnType { } // update meta - await ncMeta.metaUpdate( + return await ncMeta.metaUpdate( null, null, MetaTable.FORM_VIEW_COLUMNS, diff --git a/packages/nocodb/src/lib/models/GridViewColumn.ts b/packages/nocodb/src/lib/models/GridViewColumn.ts index 0593cc1b34..1c81d33e34 100644 --- a/packages/nocodb/src/lib/models/GridViewColumn.ts +++ b/packages/nocodb/src/lib/models/GridViewColumn.ts @@ -133,7 +133,7 @@ export default class GridViewColumn implements GridColumnType { await NocoCache.set(key, o); } // set meta - await ncMeta.metaUpdate( + return await ncMeta.metaUpdate( null, null, MetaTable.GRID_VIEW_COLUMNS, diff --git a/packages/nocodb/src/lib/services/views/galleryView.svc.ts b/packages/nocodb/src/lib/services/views/galleryView.svc.ts index 03ea822391..fafe3cb95f 100644 --- a/packages/nocodb/src/lib/services/views/galleryView.svc.ts +++ b/packages/nocodb/src/lib/services/views/galleryView.svc.ts @@ -31,5 +31,5 @@ export async function galleryViewUpdate(param: { validatePayload('swagger.json#/components/schemas/GalleryReq', param.gallery); T.emit('evt', { evt_type: 'view:updated', type: 'gallery' }); - await GalleryView.update(param.galleryViewId, param.gallery); + return await GalleryView.update(param.galleryViewId, param.gallery); }