feat: review

This commit is contained in:
moolcoov
2025-03-02 17:53:20 +03:00
parent 802c88adb0
commit 8accf88bb6
11 changed files with 166 additions and 10 deletions
+4 -2
View File
@@ -1,10 +1,12 @@
import { apiFetch } from ".";
import { Reviewer } from "../types/review";
import { Review, Reviewer } from "../types/review";
export const getReviewer = async (token: string) => {
return await apiFetch<Reviewer>(`/review/${token}`);
};
export const getReviewerSubmissions = async (token: string) => {
return await apiFetch(`/review/${token}/submissions`);
return await apiFetch<{ submissions: Review[] }>(
`/review/${token}/submissions`,
);
};