Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor fun getExistingContentTypes in contentmapper
  • Loading branch information
shristi-sinha committed Mar 20, 2024
commit efa16ba496070f2f3d05a5dc3df8de94319886c4
6 changes: 5 additions & 1 deletion src/services/contentMapper.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,11 @@ const getExistingContentTypes = async (req: Request) => {
token_payload?.region,
token_payload?.user_id
);
const project = await ProjectModel.findById(projectId);
await ProjectModelLowdb.read();
const project = ProjectModelLowdb.chain
.get("projects")
.find({ id: projectId })
.value();
const stackId = project?.destination_stack_id;
const [err, res] = await safePromise(
https({
Expand Down