chore: get user resource progress api

pull/3813/head
Arik Chakma 2 years ago
parent 7177638b49
commit 0018627afe
  1. 17
      src/lib/progress-api.ts

@ -1,4 +1,4 @@
import { httpPatch } from './http'; import { httpGet, httpPatch } from './http';
export async function toggleMarkResourceDoneApi({ export async function toggleMarkResourceDoneApi({
resourceId, resourceId,
@ -17,3 +17,18 @@ export async function toggleMarkResourceDoneApi({
topicId, 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,
});
}

Loading…
Cancel
Save