( markAsCompleted: boolean, contentId: number, )
| 147 | }; |
| 148 | |
| 149 | export 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 | |
| 166 | export const getFolderPercentCompleted = (childrenContent: any) => { |
| 167 | if (childrenContent && childrenContent.length > 0) { |
no outgoing calls
no test coverage detected