MCPcopy
hub / github.com/Peppermint-Lab/peppermint / deleteIssue

Function deleteIssue

apps/client/components/TicketDetails/index.tsx:262–284  ·  view source on GitHub ↗
(locked)

Source from the content-addressed store, hash-verified

260 }
261
262 async function deleteIssue(locked) {
263 await fetch(`/api/v1/ticket/delete`, {
264 method: "POST",
265 headers: {
266 "Content-Type": "application/json",
267 Authorization: `Bearer ${token}`,
268 },
269 body: JSON.stringify({
270 id,
271 }),
272 })
273 .then((res) => res.json())
274 .then((res) => {
275 if (res.success) {
276 toast({
277 variant: "default",
278 title: "Issue Deleted",
279 description: "The issue has been deleted",
280 });
281 router.push("/issues");
282 }
283 });
284 }
285
286 async function addComment() {
287 if (data && data.ticket && data.ticket.locked) return;

Callers 1

TicketFunction · 0.85

Calls 1

toastFunction · 0.90

Tested by

no test coverage detected