Skip to content

Commit

Permalink
chore: toggle mark resource done api
Browse files Browse the repository at this point in the history
  • Loading branch information
arikchakma committed Apr 11, 2023
1 parent a0764aa commit 38b1cf4
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/lib/progress-api.ts
Original file line number Diff line number Diff line change
@@ -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,
});
}

0 comments on commit 38b1cf4

Please sign in to comment.