Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Commit

Permalink
fix: manual update
Browse files Browse the repository at this point in the history
  • Loading branch information
MrlolDev committed Jul 21, 2023
1 parent 59d52c4 commit 2653685
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/routes/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,16 @@ router.get("/:c/:id", async (req: Request, res: Response) => {
},
})
);
await delay(1000);
let { data: fc } = await supabase
await supabase
.from("campaigns_new")
.select("*")
.eq("id", c)
.single();
console.log(fc.stats);
.update({ stats: stats })
.eq("id", fullCampaign.id);

let updatedCampaign: any = await cache.get(`campaigns:${c}`);
updatedCampaign = JSON.parse(updatedCampaign);
updatedCampaign.stats = stats;

cache.set(`campaigns:${c}`, JSON.stringify(updatedCampaign));
}
});

Expand Down

0 comments on commit 2653685

Please sign in to comment.