MCPcopy Create free account
hub / github.com/RealDevSquad/website-backend / sendTaskUpdate

Function sendTaskUpdate

utils/sendTaskUpdate.js:4–26  ·  view source on GitHub ↗
(completed, blockers, planned, userName, taskId, taskTitle)

Source from the content-addressed store, hash-verified

2const DISCORD_BASE_URL = config.get("services.discordBot.baseUrl");
3
4export const sendTaskUpdate = async (completed, blockers, planned, userName, taskId, taskTitle) => {
5 try {
6 const headers = generateCloudFlareHeaders();
7 const body = {
8 content: {
9 completed,
10 blockers,
11 planned,
12 userName,
13 taskId,
14 taskTitle,
15 },
16 };
17 await fetch(`${DISCORD_BASE_URL}/task/update`, {
18 method: "POST",
19 headers,
20 body: JSON.stringify(body),
21 });
22 } catch (error) {
23 logger.error("Something went wrong", error);
24 throw error;
25 }
26};

Callers 2

createProgressFunction · 0.85

Calls 2

fetchFunction · 0.85

Tested by

no test coverage detected