Skip to content

Commit

Permalink
uncommented lines in api.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Princekumarofficial committed Jun 13, 2024
1 parent 75169cf commit 7702cc7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/helpers/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ export const fetchApprovals = async (
accessToken: string | undefined,
filter: string | undefined
) => {
// if (!accessToken || accessToken === undefined) {
// redirect();
// return;
// }
if (!accessToken || accessToken === undefined) {
redirect();
return;
}
const res = await fetch(
filter ? url(`/faculty-approvals?${filter}`) : url("/faculty-approvals"),
{
Expand All @@ -179,10 +179,10 @@ export async function updateApproval(
accessToken: string | undefined,
data: any[]
) {
// if (!accessToken || accessToken === undefined) {
// redirect();
// return;
// }
if (!accessToken || accessToken === undefined) {
redirect();
return;
}
fetch(url("/faculty-approvals"), {
method: "PATCH",
cache: "no-store",
Expand Down

0 comments on commit 7702cc7

Please sign in to comment.