chore: toggle mark resource done api

pull/3813/head
Arik Chakma 2 years ago
parent a0764aa7be
commit 38b1cf4b33
  1. 19
      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,
});
}
Loading…
Cancel
Save