diff --git a/packages/nc-gui/components/account/UserList.vue b/packages/nc-gui/components/account/UserList.vue index b1186e3481..484559e9a7 100644 --- a/packages/nc-gui/components/account/UserList.vue +++ b/packages/nc-gui/components/account/UserList.vue @@ -35,13 +35,13 @@ const pagination = reactive({ const loadUsers = async (page = currentPage, limit = currentLimit) => { currentPage = page try { - const response: any = await api.orgUsers.list({ + const response: any = (await api.orgUsers.list({ query: { limit, offset: searchText.value.length === 0 ? (page - 1) * limit : 0, query: searchText.value, }, - } as RequestParams) + } as RequestParams)).list if (!response) return pagination.total = response.pageInfo.totalRows ?? 0 diff --git a/packages/nc-gui/components/smartsheet/header/Menu.vue b/packages/nc-gui/components/smartsheet/header/Menu.vue index bb6fb31c31..ab18451d26 100644 --- a/packages/nc-gui/components/smartsheet/header/Menu.vue +++ b/packages/nc-gui/components/smartsheet/header/Menu.vue @@ -144,7 +144,7 @@ const duplicateColumn = async () => { } try { - const gridViewColumnList = await $api.dbViewColumn.list(view.value?.id as string) + const gridViewColumnList = (await $api.dbViewColumn.list(view.value?.id as string)).list const currentColumnIndex = gridViewColumnList.findIndex((f) => f.fk_column_id === column!.value.id) let newColumnOrder @@ -175,7 +175,7 @@ const duplicateColumn = async () => { // add column before or after current column const addColumn = async (before = false) => { - const gridViewColumnList = await $api.dbViewColumn.list(view.value?.id as string) + const gridViewColumnList = (await $api.dbViewColumn.list(view.value?.id as string)).list const currentColumnIndex = gridViewColumnList.findIndex((f) => f.fk_column_id === column!.value.id) @@ -204,7 +204,7 @@ const addColumn = async (before = false) => { // hide the field in view const hideField = async () => { - const gridViewColumnList = await $api.dbViewColumn.list(view.value?.id as string) + const gridViewColumnList = (await $api.dbViewColumn.list(view.value?.id as string)).list const currentColumn = gridViewColumnList.find((f) => f.fk_column_id === column!.value.id) diff --git a/packages/nc-gui/components/smartsheet/toolbar/SharedViewList.vue b/packages/nc-gui/components/smartsheet/toolbar/SharedViewList.vue index ba56e370bf..97ed60984a 100644 --- a/packages/nc-gui/components/smartsheet/toolbar/SharedViewList.vue +++ b/packages/nc-gui/components/smartsheet/toolbar/SharedViewList.vue @@ -34,7 +34,7 @@ const { dashboardUrl } = useDashboard() const sharedViewList = ref() const loadSharedViewsList = async () => { - sharedViewList.value = await $api.dbViewShare.list(meta.value?.id as string) + sharedViewList.value = (await $api.dbViewShare.list(meta.value?.id as string)).list as SharedViewType[] // todo: show active view in list separately // const index = sharedViewList.value.findIndex((v) => { diff --git a/packages/nc-gui/components/tabs/auth/ApiTokenManagement.vue b/packages/nc-gui/components/tabs/auth/ApiTokenManagement.vue index 20752fd43e..52805de6a3 100644 --- a/packages/nc-gui/components/tabs/auth/ApiTokenManagement.vue +++ b/packages/nc-gui/components/tabs/auth/ApiTokenManagement.vue @@ -25,7 +25,7 @@ let selectedTokenData = $ref({}) const loadApiTokens = async () => { if (!project?.id) return - tokensInfo = await $api.apiToken.list(project.id) + tokensInfo = (await $api.apiToken.list(project.id)).list } const openNewTokenModal = () => { @@ -40,7 +40,7 @@ const copyToken = async (token: string | undefined) => { await copy(token) // Copied to clipboard message.info(t('msg.info.copiedToClipboard')) - } catch (e) { + } catch (e: any) { message.error(e.message) } $e('c:api-token:copy') diff --git a/packages/nc-gui/composables/useExpandedFormStore.ts b/packages/nc-gui/composables/useExpandedFormStore.ts index 79f4590c30..60514fd428 100644 --- a/packages/nc-gui/composables/useExpandedFormStore.ts +++ b/packages/nc-gui/composables/useExpandedFormStore.ts @@ -98,11 +98,11 @@ const [useProvideExpandedFormStore, useExpandedFormStore] = useInjectionState((m commentsAndLogs.value = ( - await api.utils.commentList({ + (await api.utils.commentList({ row_id: rowId, fk_model_id: meta.value.id as string, comments_only: commentsOnly.value, - }) + })).list )?.reverse?.() || [] } diff --git a/packages/nc-gui/composables/useViewColumns.ts b/packages/nc-gui/composables/useViewColumns.ts index 59e1e7d873..a2ddb84d8c 100644 --- a/packages/nc-gui/composables/useViewColumns.ts +++ b/packages/nc-gui/composables/useViewColumns.ts @@ -50,7 +50,7 @@ export function useViewColumns( let order = 1 if (view.value?.id) { - const data = (isPublic.value ? meta.value?.columns : await $api.dbViewColumn.list(view.value.id)) as any[] + const data = (isPublic.value ? meta.value?.columns : (await $api.dbViewColumn.list(view.value.id))).list as any[] const fieldById = data.reduce>((acc, curr) => { curr.show = !!curr.show