MCPcopy Create free account
hub / github.com/code100x/cms / handleMarkAsCompleted

Function handleMarkAsCompleted

src/lib/utils.ts:149–164  ·  view source on GitHub ↗
(
  markAsCompleted: boolean,
  contentId: number,
)

Source from the content-addressed store, hash-verified

147};
148
149export const handleMarkAsCompleted = async (
150 markAsCompleted: boolean,
151 contentId: number,
152) => {
153 const response = await fetch('/api/course/videoProgress/markAsCompleted', {
154 body: JSON.stringify({
155 markAsCompleted,
156 contentId,
157 }),
158 method: 'POST',
159 headers: {
160 'Content-Type': 'application/json',
161 },
162 });
163 return await response.json();
164};
165
166export const getFolderPercentCompleted = (childrenContent: any) => {
167 if (childrenContent && childrenContent.length > 0) {

Callers 3

NotionRendererFunction · 0.90
handleVideoEndedFunction · 0.90
CheckFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected