diff --git a/front/lib/resources/data_source_view_resource.ts b/front/lib/resources/data_source_view_resource.ts index 075e060f428a..d8e9a66187c0 100644 --- a/front/lib/resources/data_source_view_resource.ts +++ b/front/lib/resources/data_source_view_resource.ts @@ -35,11 +35,9 @@ export class DataSourceViewResource extends ResourceWithVault, blob: Attributes, - vault: VaultResource, - dataSource: DataSourceResource + vault: VaultResource ) { super(DataSourceViewModel, blob, vault); - this.ds = dataSource; } // Creation. @@ -53,13 +51,15 @@ export class DataSourceViewResource extends ResourceWithVault> { try { const [, affectedRows] = await this.model.update( diff --git a/front/pages/api/registry/[type]/lookup.ts b/front/pages/api/registry/[type]/lookup.ts index 1fbeb87ae455..2a1a4453a545 100644 --- a/front/pages/api/registry/[type]/lookup.ts +++ b/front/pages/api/registry/[type]/lookup.ts @@ -215,7 +215,6 @@ async function handleDataSourceView( if (!dataSource) { return new Err(new Error("Data source not found for view.")); } - return new Ok({ project_id: parseInt(dataSource.dustAPIProjectId), data_source_id: dataSource.name, diff --git a/front/pages/api/w/[wId]/vaults/[vId]/data_sources/[dsId]/content.ts b/front/pages/api/w/[wId]/vaults/[vId]/data_sources/[dsId]/content.ts index 05790dd4ff34..a211e20c7b03 100644 --- a/front/pages/api/w/[wId]/vaults/[vId]/data_sources/[dsId]/content.ts +++ b/front/pages/api/w/[wId]/vaults/[vId]/data_sources/[dsId]/content.ts @@ -1,7 +1,7 @@ import type { WithAPIErrorResponse } from "@dust-tt/types"; import type { NextApiRequest, NextApiResponse } from "next"; -import type { GetDataSourceContentResponseBody } from "@app/lib/api/vaults"; +import type { GetDataSourceOrViewContentResponseBody } from "@app/lib/api/vaults"; import { getContentHandler } from "@app/lib/api/vaults"; import { withSessionAuthenticationForWorkspace } from "@app/lib/api/wrappers"; import type { Authenticator } from "@app/lib/auth"; @@ -10,7 +10,9 @@ import { apiError } from "@app/logger/withlogging"; async function handler( req: NextApiRequest, - res: NextApiResponse>, + res: NextApiResponse< + WithAPIErrorResponse + >, auth: Authenticator ): Promise { const owner = auth.workspace();