diff --git a/src/lib/progress-api.ts b/src/lib/progress-api.ts new file mode 100644 index 000000000..a9a42c8ce --- /dev/null +++ b/src/lib/progress-api.ts @@ -0,0 +1,19 @@ +import { httpPatch } from './http'; + +export async function toggleMarkResourceDoneApi({ + resourceId, + resourceType, + topicId, +}: { + resourceId: string; + resourceType: 'roadmap' | 'best-practice'; + topicId: string; +}) { + return await httpPatch<{ + status: 'ok'; + }>(`${import.meta.env.PUBLIC_API_URL}/v1-toggle-mark-resource-done`, { + resourceId, + resourceType, + topicId, + }); +}