Update project-dal.ts

This commit is contained in:
Daniel Hougaard
2024-02-01 10:14:17 +04:00
parent cff15b64c4
commit e9fa631c8f

View File

@@ -41,7 +41,7 @@ export const projectDALFactory = (db: TDbClient) => {
return nestedWorkspaces.map((workspace) => ({
...workspace,
organization: workspace.id
organization: workspace.orgId
}));
} catch (error) {
throw new DatabaseError({ error, name: "Find all projects" });
@@ -83,7 +83,7 @@ export const projectDALFactory = (db: TDbClient) => {
// We need to add the organization field, as it's required for one of our API endpoint responses.
return nestedWorkspaces.map((workspace) => ({
...workspace,
organization: workspace.id
organization: workspace.orgId
}));
} catch (error) {
throw new DatabaseError({ error, name: "Find all projects by identity" });