diff --git a/src/lib/progress-api.ts b/src/lib/progress-api.ts index a9a42c8ce..6fe3e2d04 100644 --- a/src/lib/progress-api.ts +++ b/src/lib/progress-api.ts @@ -1,4 +1,4 @@ -import { httpPatch } from './http'; +import { httpGet, httpPatch } from './http'; export async function toggleMarkResourceDoneApi({ resourceId, @@ -17,3 +17,18 @@ export async function toggleMarkResourceDoneApi({ topicId, }); } + +export async function getUserResourceProgressApi({ + resourceId, + resourceType, +}: { + resourceId: string; + resourceType: 'roadmap' | 'best-practice'; +}) { + return await httpGet<{ + done: string[]; + }>(`${import.meta.env.PUBLIC_API_URL}/v1-get-user-resource-progress`, { + resourceId, + resourceType, + }); +}