Browse Source

refactor: bring back db in data api and remove new version of the old data api paths

pull/6644/head
Pranav C 1 year ago
parent
commit
66c3cb442c
  1. 2
      packages/nc-gui/components/smartsheet/ApiSnippet.vue
  2. 2
      packages/nc-gui/components/smartsheet/details/Api.vue
  3. 5
      packages/nocodb/src/controllers/bulk-data-alias.controller.ts
  4. 4
      packages/nocodb/src/controllers/data-alias-export.controller.ts
  5. 7
      packages/nocodb/src/controllers/data-alias-nested.controller.ts
  6. 20
      packages/nocodb/src/controllers/data-alias.controller.ts
  7. 40
      packages/nocodb/src/schema/swagger.json
  8. 30
      packages/nocodb/src/services/api-docs/swagger/templates/paths.ts
  9. 10
      packages/nocodb/tests/unit/rest/tests/tableRow.test.ts

2
packages/nc-gui/components/smartsheet/ApiSnippet.vue

@ -84,7 +84,7 @@ const selectedLangName = ref(langs[0].name)
const apiUrl = computed(
() =>
new URL(
`/api/v1/data/noco/${base.value.id}/${meta.value?.title}/views/${view.value?.title}`,
`/api/v1/db/data/noco/${base.value.id}/${meta.value?.title}/views/${view.value?.title}`,
(appInfo.value && appInfo.value.ncSiteUrl) || '/',
).href,
)

2
packages/nc-gui/components/smartsheet/details/Api.vue

@ -84,7 +84,7 @@ const selectedLangName = ref(langs[0].name)
const apiUrl = computed(
() =>
new URL(
`/api/v1/data/noco/${base.value?.id}/${meta.value?.title}/views/${view.value?.title}`,
`/api/v1/db/data/noco/${base.value?.id}/${meta.value?.title}/views/${view.value?.title}`,
(appInfo.value && appInfo.value.ncSiteUrl) || '/',
).href,
)

5
packages/nocodb/src/controllers/bulk-data-alias.controller.ts

@ -22,7 +22,6 @@ export class BulkDataAliasController {
@Post([
'/api/v1/db/data/bulk/:orgs/:baseName/:tableName',
'/api/v1/data/bulk/:orgs/:baseName/:tableName',
])
@HttpCode(200)
@Acl('bulkDataInsert')
@ -45,7 +44,6 @@ export class BulkDataAliasController {
@Patch([
'/api/v1/db/data/bulk/:orgs/:baseName/:tableName',
'/api/v1/data/bulk/:orgs/:baseName/:tableName',
])
@Acl('bulkDataUpdate')
async bulkDataUpdate(
@ -65,7 +63,6 @@ export class BulkDataAliasController {
// todo: Integrate with filterArrJson bulkDataUpdateAll
@Patch([
'/api/v1/db/data/bulk/:orgs/:baseName/:tableName/all',
'/api/v1/data/bulk/:orgs/:baseName/:tableName/all',
])
@Acl('bulkDataUpdateAll')
async bulkDataUpdateAll(
@ -85,7 +82,6 @@ export class BulkDataAliasController {
@Delete([
'/api/v1/db/data/bulk/:orgs/:baseName/:tableName',
'/api/v1/data/bulk/:orgs/:baseName/:tableName',
])
@Acl('bulkDataDelete')
async bulkDataDelete(
@ -106,7 +102,6 @@ export class BulkDataAliasController {
@Delete([
'/api/v1/db/data/bulk/:orgs/:baseName/:tableName/all',
'/api/v1/data/bulk/:orgs/:baseName/:tableName/all',
])
@Acl('bulkDataDeleteAll')
async bulkDataDeleteAll(

4
packages/nocodb/src/controllers/data-alias-export.controller.ts

@ -15,8 +15,6 @@ export class DataAliasExportController {
@Get([
'/api/v1/db/data/:orgs/:baseName/:tableName/export/excel',
'/api/v1/db/data/:orgs/:baseName/:tableName/views/:viewName/export/excel',
'/api/v1/data/:orgs/:baseName/:tableName/export/excel',
'/api/v1/data/:orgs/:baseName/:tableName/views/:viewName/export/excel',
])
@Acl('exportExcel')
async excelDataExport(@Request() req, @Response() res) {
@ -44,8 +42,6 @@ export class DataAliasExportController {
@Get([
'/api/v1/db/data/:orgs/:baseName/:tableName/views/:viewName/export/csv',
'/api/v1/db/data/:orgs/:baseName/:tableName/export/csv',
'/api/v1/data/:orgs/:baseName/:tableName/views/:viewName/export/csv',
'/api/v1/data/:orgs/:baseName/:tableName/export/csv',
])
@Acl('exportCsv')
async csvDataExport(@Request() req, @Response() res) {

7
packages/nocodb/src/controllers/data-alias-nested.controller.ts

@ -21,7 +21,6 @@ export class DataAliasNestedController {
// todo: handle case where the given column is not ltar
@Get([
'/api/v1/db/data/:orgs/:baseName/:tableName/:rowId/mm/:columnName',
'/api/v1/data/:orgs/:baseName/:tableName/:rowId/mm/:columnName',
])
@Acl('mmList')
async mmList(
@ -42,7 +41,6 @@ export class DataAliasNestedController {
@Get([
'/api/v1/db/data/:orgs/:baseName/:tableName/:rowId/mm/:columnName/exclude',
'/api/v1/data/:orgs/:baseName/:tableName/:rowId/mm/:columnName/exclude',
])
@Acl('mmExcludedList')
async mmExcludedList(
@ -63,7 +61,6 @@ export class DataAliasNestedController {
@Get([
'/api/v1/db/data/:orgs/:baseName/:tableName/:rowId/hm/:columnName/exclude',
'/api/v1/data/:orgs/:baseName/:tableName/:rowId/hm/:columnName/exclude',
])
@Acl('hmExcludedList')
async hmExcludedList(
@ -84,7 +81,6 @@ export class DataAliasNestedController {
@Get([
'/api/v1/db/data/:orgs/:baseName/:tableName/:rowId/bt/:columnName/exclude',
'/api/v1/data/:orgs/:baseName/:tableName/:rowId/bt/:columnName/exclude',
])
@Acl('btExcludedList')
async btExcludedList(
@ -107,7 +103,6 @@ export class DataAliasNestedController {
@Get([
'/api/v1/db/data/:orgs/:baseName/:tableName/:rowId/hm/:columnName',
'/api/v1/data/:orgs/:baseName/:tableName/:rowId/hm/:columnName',
])
@Acl('hmList')
async hmList(
@ -128,7 +123,6 @@ export class DataAliasNestedController {
@Delete([
'/api/v1/db/data/:orgs/:baseName/:tableName/:rowId/:relationType/:columnName/:refRowId',
'/api/v1/data/:orgs/:baseName/:tableName/:rowId/:relationType/:columnName/:refRowId',
])
@Acl('relationDataRemove')
async relationDataRemove(
@ -154,7 +148,6 @@ export class DataAliasNestedController {
// todo: Give proper error message when reference row is already related and handle duplicate ref row id in hm
@Post([
'/api/v1/db/data/:orgs/:baseName/:tableName/:rowId/:relationType/:columnName/:refRowId',
'/api/v1/data/:orgs/:baseName/:tableName/:rowId/:relationType/:columnName/:refRowId',
])
@Acl('relationDataAdd')
@HttpCode(200)

20
packages/nocodb/src/controllers/data-alias.controller.ts

@ -27,8 +27,6 @@ export class DataAliasController {
@Get([
'/api/v1/db/data/:orgs/:baseName/:tableName',
'/api/v1/db/data/:orgs/:baseName/:tableName/views/:viewName',
'/api/v1/data/:orgs/:baseName/:tableName',
'/api/v1/data/:orgs/:baseName/:tableName/views/:viewName',
])
@Acl('dataList')
async dataList(
@ -61,8 +59,6 @@ export class DataAliasController {
@Get([
'/api/v1/db/data/:orgs/:baseName/:tableName/find-one',
'/api/v1/db/data/:orgs/:baseName/:tableName/views/:viewName/find-one',
'/api/v1/data/:orgs/:baseName/:tableName/find-one',
'/api/v1/data/:orgs/:baseName/:tableName/views/:viewName/find-one',
])
@Acl('dataFindOne')
async dataFindOne(
@ -82,8 +78,6 @@ export class DataAliasController {
@Get([
'/api/v1/db/data/:orgs/:baseName/:tableName/groupby',
'/api/v1/db/data/:orgs/:baseName/:tableName/views/:viewName/groupby',
'/api/v1/data/:orgs/:baseName/:tableName/groupby',
'/api/v1/data/:orgs/:baseName/:tableName/views/:viewName/groupby',
])
@Acl('dataGroupBy')
async dataGroupBy(
@ -103,8 +97,6 @@ export class DataAliasController {
@Get([
'/api/v1/db/data/:orgs/:baseName/:tableName/count',
'/api/v1/db/data/:orgs/:baseName/:tableName/views/:viewName/count',
'/api/v1/data/:orgs/:baseName/:tableName/count',
'/api/v1/data/:orgs/:baseName/:tableName/views/:viewName/count',
])
@Acl('dataCount')
async dataCount(
@ -127,8 +119,6 @@ export class DataAliasController {
@Post([
'/api/v1/db/data/:orgs/:baseName/:tableName',
'/api/v1/db/data/:orgs/:baseName/:tableName/views/:viewName',
'/api/v1/data/:orgs/:baseName/:tableName',
'/api/v1/data/:orgs/:baseName/:tableName/views/:viewName',
])
@HttpCode(200)
@Acl('dataInsert')
@ -153,8 +143,6 @@ export class DataAliasController {
@Patch([
'/api/v1/db/data/:orgs/:baseName/:tableName/:rowId',
'/api/v1/db/data/:orgs/:baseName/:tableName/views/:viewName/:rowId',
'/api/v1/data/:orgs/:baseName/:tableName/:rowId',
'/api/v1/data/:orgs/:baseName/:tableName/views/:viewName/:rowId',
])
@Acl('dataUpdate')
async dataUpdate(
@ -179,8 +167,6 @@ export class DataAliasController {
@Delete([
'/api/v1/db/data/:orgs/:baseName/:tableName/:rowId',
'/api/v1/db/data/:orgs/:baseName/:tableName/views/:viewName/:rowId',
'/api/v1/data/:orgs/:baseName/:tableName/:rowId',
'/api/v1/data/:orgs/:baseName/:tableName/views/:viewName/:rowId',
])
@Acl('dataDelete')
async dataDelete(
@ -202,8 +188,6 @@ export class DataAliasController {
@Get([
'/api/v1/db/data/:orgs/:baseName/:tableName/:rowId',
'/api/v1/db/data/:orgs/:baseName/:tableName/views/:viewName/:rowId',
'/api/v1/data/:orgs/:baseName/:tableName/:rowId',
'/api/v1/data/:orgs/:baseName/:tableName/views/:viewName/:rowId',
])
@Acl('dataRead')
async dataRead(
@ -229,8 +213,6 @@ export class DataAliasController {
@Get([
'/api/v1/db/data/:orgs/:baseName/:tableName/:rowId/exist',
'/api/v1/db/data/:orgs/:baseName/:tableName/views/:viewName/:rowId/exist',
'/api/v1/data/:orgs/:baseName/:tableName/:rowId/exist',
'/api/v1/data/:orgs/:baseName/:tableName/views/:viewName/:rowId/exist',
])
@Acl('dataExist')
async dataExist(
@ -257,8 +239,6 @@ export class DataAliasController {
@Get([
'/api/v1/db/data/:orgs/:baseName/:tableName/group/:columnId',
'/api/v1/db/data/:orgs/:baseName/:tableName/views/:viewName/group/:columnId',
'/api/v1/data/:orgs/:baseName/:tableName/group/:columnId',
'/api/v1/data/:orgs/:baseName/:tableName/views/:viewName/group/:columnId',
])
@Acl('groupedDataList')
async groupedDataList(

40
packages/nocodb/src/schema/swagger.json

@ -8653,7 +8653,7 @@
"x-internal": true
}
},
"/api/v1/data/{orgs}/{baseName}/{tableName}": {
"/api/v1/db/data/{orgs}/{baseName}/{tableName}": {
"parameters": [
{
"schema": {
@ -8907,7 +8907,7 @@
]
}
},
"/api/v1/data/{orgs}/{baseName}/{tableName}/find-one": {
"/api/v1/db/data/{orgs}/{baseName}/{tableName}/find-one": {
"parameters": [
{
"schema": {
@ -8997,7 +8997,7 @@
}
}
},
"/api/v1/data/{orgs}/{baseName}/{tableName}/groupby": {
"/api/v1/db/data/{orgs}/{baseName}/{tableName}/groupby": {
"parameters": [
{
"schema": {
@ -9089,7 +9089,7 @@
}
}
},
"/api/v1/data/{orgs}/{baseName}/{tableName}/views/{viewName}/group/{columnId}": {
"/api/v1/db/data/{orgs}/{baseName}/{tableName}/views/{viewName}/group/{columnId}": {
"parameters": [
{
"schema": {
@ -9267,7 +9267,7 @@
}
}
},
"/api/v1/data/{orgs}/{baseName}/{tableName}/group/{columnId}": {
"/api/v1/db/data/{orgs}/{baseName}/{tableName}/group/{columnId}": {
"parameters": [
{
"schema": {
@ -9435,7 +9435,7 @@
}
}
},
"/api/v1/data/{orgs}/{baseName}/{tableName}/views/{viewName}": {
"/api/v1/db/data/{orgs}/{baseName}/{tableName}/views/{viewName}": {
"parameters": [
{
"schema": {
@ -9669,7 +9669,7 @@
"description": "Create a new row in the given Table View"
}
},
"/api/v1/data/{orgs}/{baseName}/{tableName}/views/{viewName}/find-one": {
"/api/v1/db/data/{orgs}/{baseName}/{tableName}/views/{viewName}/find-one": {
"parameters": [
{
"schema": {
@ -9773,7 +9773,7 @@
}
}
},
"/api/v1/data/{orgs}/{baseName}/{tableName}/views/{viewName}/groupby": {
"/api/v1/db/data/{orgs}/{baseName}/{tableName}/views/{viewName}/groupby": {
"parameters": [
{
"schema": {
@ -9876,7 +9876,7 @@
}
}
},
"/api/v1/data/{orgs}/{baseName}/{tableName}/views/{viewName}/count": {
"/api/v1/db/data/{orgs}/{baseName}/{tableName}/views/{viewName}/count": {
"parameters": [
{
"schema": {
@ -9970,7 +9970,7 @@
}
}
},
"/api/v1/data/{orgs}/{baseName}/{tableName}/views/{viewName}/{rowId}": {
"/api/v1/db/data/{orgs}/{baseName}/{tableName}/views/{viewName}/{rowId}": {
"parameters": [
{
"schema": {
@ -10146,7 +10146,7 @@
]
}
},
"/api/v1/data/{orgs}/{baseName}/{tableName}/views/{viewName}/{rowId}/exist": {
"/api/v1/db/data/{orgs}/{baseName}/{tableName}/views/{viewName}/{rowId}/exist": {
"parameters": [
{
"schema": {
@ -10227,7 +10227,7 @@
]
}
},
"/api/v1/data/{orgs}/{baseName}/{tableName}/{rowId}": {
"/api/v1/db/data/{orgs}/{baseName}/{tableName}/{rowId}": {
"parameters": [
{
"schema": {
@ -10402,7 +10402,7 @@
]
}
},
"/api/v1/data/{orgs}/{baseName}/{tableName}/{rowId}/exist": {
"/api/v1/db/data/{orgs}/{baseName}/{tableName}/{rowId}/exist": {
"parameters": [
{
"schema": {
@ -10475,7 +10475,7 @@
]
}
},
"/api/v1/data/bulk/{orgs}/{baseName}/{tableName}": {
"/api/v1/db/data/bulk/{orgs}/{baseName}/{tableName}": {
"parameters": [
{
"schema": {
@ -10733,7 +10733,7 @@
]
}
},
"/api/v1/data/bulk/{orgs}/{baseName}/{tableName}/all": {
"/api/v1/db/data/bulk/{orgs}/{baseName}/{tableName}/all": {
"parameters": [
{
"schema": {
@ -10890,7 +10890,7 @@
]
}
},
"/api/v1/data/{orgs}/{baseName}/{tableName}/views/{viewName}/export/{type}": {
"/api/v1/db/data/{orgs}/{baseName}/{tableName}/views/{viewName}/export/{type}": {
"parameters": [
{
"schema": {
@ -10976,7 +10976,7 @@
]
}
},
"/api/v1/data/{orgs}/{baseName}/{tableName}/export/{type}": {
"/api/v1/db/data/{orgs}/{baseName}/{tableName}/export/{type}": {
"parameters": [
{
"schema": {
@ -11054,7 +11054,7 @@
]
}
},
"/api/v1/data/{orgs}/{baseName}/{tableName}/{rowId}/{relationType}/{columnName}": {
"/api/v1/db/data/{orgs}/{baseName}/{tableName}/{rowId}/{relationType}/{columnName}": {
"parameters": [
{
"schema": {
@ -11166,7 +11166,7 @@
"description": "List all nested relations rows"
}
},
"/api/v1/data/{orgs}/{baseName}/{tableName}/{rowId}/{relationType}/{columnName}/{refRowId}": {
"/api/v1/db/data/{orgs}/{baseName}/{tableName}/{rowId}/{relationType}/{columnName}/{refRowId}": {
"parameters": [
{
"schema": {
@ -11391,7 +11391,7 @@
]
}
},
"/api/v1/data/{orgs}/{baseName}/{tableName}/{rowId}/{relationType}/{columnName}/exclude": {
"/api/v1/db/data/{orgs}/{baseName}/{tableName}/{rowId}/{relationType}/{columnName}/exclude": {
"parameters": [
{
"schema": {

30
packages/nocodb/src/services/api-docs/swagger/templates/paths.ts

@ -25,7 +25,7 @@ export const getModelPaths = async (ctx: {
columns: SwaggerColumn[];
baseName: string;
}): Promise<{ [path: string]: any }> => ({
[`/api/v1/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}`]: {
[`/api/v1/db/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}`]: {
get: {
summary: `${ctx.tableName} list`,
operationId: `${ctx.tableName.toLowerCase()}-db-table-row-list`,
@ -84,7 +84,7 @@ export const getModelPaths = async (ctx: {
}
: {}),
},
[`/api/v1/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/{rowId}`]: {
[`/api/v1/db/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/{rowId}`]: {
parameters: [rowIdParam],
...(ctx.type === ModelTypes.TABLE
? {
@ -149,7 +149,7 @@ export const getModelPaths = async (ctx: {
}
: {}),
},
[`/api/v1/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/count`]: {
[`/api/v1/db/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/count`]: {
get: {
summary: `${ctx.tableName} count`,
operationId: `${ctx.tableName.toLowerCase()}-count`,
@ -168,7 +168,7 @@ export const getModelPaths = async (ctx: {
},
},
},
[`/api/v1/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/find-one`]: {
[`/api/v1/db/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/find-one`]: {
get: {
summary: `${ctx.tableName} find-one`,
operationId: `${ctx.tableName.toLowerCase()}-db-table-row-find-one`,
@ -189,7 +189,7 @@ export const getModelPaths = async (ctx: {
},
},
},
[`/api/v1/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/groupby`]: {
[`/api/v1/db/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/groupby`]: {
get: {
summary: `${ctx.tableName} groupby`,
operationId: `${ctx.tableName.toLowerCase()}-groupby`,
@ -230,7 +230,7 @@ export const getModelPaths = async (ctx: {
},
...(ctx.type === ModelTypes.TABLE
? {
[`/api/v1/data/bulk/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}`]: {
[`/api/v1/db/data/bulk/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}`]: {
post: {
summary: `${ctx.tableName} bulk insert`,
description:
@ -304,7 +304,7 @@ export const getModelPaths = async (ctx: {
},
},
},
[`/api/v1/data/bulk/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/all`]:
[`/api/v1/db/data/bulk/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/all`]:
{
parameters: [whereParam],
patch: {
@ -352,7 +352,7 @@ export const getModelPaths = async (ctx: {
...(isRelationExist(ctx.columns)
? {
[`/api/v1/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/{rowId}/{relationType}/{columnName}`]:
[`/api/v1/db/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/{rowId}/{relationType}/{columnName}`]:
{
parameters: [
rowIdParam,
@ -376,7 +376,7 @@ export const getModelPaths = async (ctx: {
parameters: [limitParam, offsetParam],
},
},
[`/api/v1/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/{rowId}/{relationType}/{columnName}/{refRowId}`]:
[`/api/v1/db/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/{rowId}/{relationType}/{columnName}/{refRowId}`]:
{
parameters: [
rowIdParam,
@ -417,7 +417,7 @@ export const getModelPaths = async (ctx: {
tags: [ctx.tableName],
},
},
[`/api/v1/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/{rowId}/{relationType}/{columnName}/exclude`]:
[`/api/v1/db/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/{rowId}/{relationType}/{columnName}/exclude`]:
{
parameters: [
rowIdParam,
@ -446,7 +446,7 @@ export const getModelPaths = async (ctx: {
: {}),
}
: {}),
[`/api/v1/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/export/{type}`]: {
[`/api/v1/db/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/export/{type}`]: {
parameters: [exportTypeParam],
get: {
summary: 'Rows export',
@ -478,7 +478,7 @@ export const getViewPaths = async (ctx: {
baseName: string;
columns: SwaggerColumn[];
}): Promise<any> => ({
[`/api/v1/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/views/${ctx.viewName}`]:
[`/api/v1/db/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/views/${ctx.viewName}`]:
{
get: {
summary: `${ctx.viewName} list`,
@ -535,7 +535,7 @@ export const getViewPaths = async (ctx: {
}
: {}),
},
[`/api/v1/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/views/${ctx.viewName}/count`]:
[`/api/v1/db/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/views/${ctx.viewName}/count`]:
{
get: {
summary: `${ctx.viewName} count`,
@ -562,7 +562,7 @@ export const getViewPaths = async (ctx: {
},
...(ctx.type === ModelTypes.TABLE
? {
[`/api/v1/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/views/${ctx.viewName}/{rowId}`]:
[`/api/v1/db/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/views/${ctx.viewName}/{rowId}`]:
{
parameters: [rowIdParam],
get: {
@ -625,7 +625,7 @@ export const getViewPaths = async (ctx: {
},
}
: {}),
[`/api/v1/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/views/${ctx.viewName}/export/{type}`]:
[`/api/v1/db/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/views/${ctx.viewName}/export/{type}`]:
{
parameters: [exportTypeParam],
get: {

10
packages/nocodb/tests/unit/rest/tests/tableRow.test.ts

@ -1440,7 +1440,7 @@ function tableTest() {
// console.log(formulaColumn);
// const response = await request(context.app)
// .get(`/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}`)
// .get(`/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}`)
// .set('xc-auth', context.token)
// .query({
// sortArrJson: JSON.stringify([
@ -1939,7 +1939,7 @@ function tableTest() {
// const rows = await listRow({ base, table });
// await request(context.app)
// .delete(`/api/v1/data/bulk/noco/${base.id}/${table.id}/all`)
// .delete(`/api/v1/db/data/bulk/noco/${base.id}/${table.id}/all`)
// .set('xc-auth', context.token)
// .query({ filterArr: [
// {
@ -1976,7 +1976,7 @@ function tableTest() {
// (column) => column.title === 'Rentals'
// )!;
// const response = await request(context.app)
// .get(`/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}`)
// .get(`/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}`)
// .query({
// fields: visibleColumns.map((c) => c.title),
// })
@ -2002,12 +2002,12 @@ function tableTest() {
// const refId = 1;
// await request(context.app)
// .post(`/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}/${refId}`)
// .post(`/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}/${refId}`)
// .set('xc-auth', context.token)
// .expect(400)
// await request(context.app)
// .post(`/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}/${refId}`)
// .post(`/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}/${refId}`)
// .set('xc-auth', context.token)
// .expect(400)
// })

Loading…
Cancel
Save