Skip to content

Commit

Permalink
Merge pull request #170 from kushwahramkumar2003/ram
Browse files Browse the repository at this point in the history
user service added
  • Loading branch information
kushwahramkumar2003 authored Feb 27, 2024
2 parents 1624b68 + 744b774 commit 2d2d418
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/services/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,16 @@ export const updateAdminProfile = async ({ userData }) => {
throw new Error(error.msg);
}
};


export const getAllResult = async () => {
try {
const { data } = await api.get("/api/v1/result/results");
return data;
} catch (error) {
console.log(error);
if (error.response && error.response.data.msg)
throw new Error(error.response.data.msg);
throw new Error(error.msg);
}
};

0 comments on commit 2d2d418

Please sign in to comment.