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

Function updateTicketStatus

apps/client/pages/issues/open.tsx:204–222  ·  view source on GitHub ↗
(e: any, ticket: any)

Source from the content-addressed store, hash-verified

202 }
203
204 async function updateTicketStatus(e: any, ticket: any) {
205 await fetch(`/api/v1/ticket/status/update`, {
206 method: "PUT",
207 headers: {
208 Authorization: `Bearer ${token}`,
209 "Content-Type": "application/json",
210 },
211 body: JSON.stringify({ id: ticket.id, status: !ticket.isComplete }),
212 })
213 .then((res) => res.json())
214 .then(() => {
215 toast({
216 title: ticket.isComplete ? "Issue re-opened" : "Issue closed",
217 description: "The status of the issue has been updated.",
218 duration: 3000,
219 });
220 refetch();
221 });
222 }
223
224 // Add these new functions
225 async function updateTicketAssignee(ticketId: string, user: any) {

Callers 1

TicketsFunction · 0.70

Calls 1

toastFunction · 0.90

Tested by

no test coverage detected