Skip to content

Commit

Permalink
fix: api calls
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Jan 23, 2025
1 parent f89ed42 commit 7402c38
Show file tree
Hide file tree
Showing 5 changed files with 238 additions and 254 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
],
"dependencies": {
"@react-pdf/renderer": "^4.0.0",
"codeforlife": "2.6.5",
"codeforlife": "github:ocadotechnology/codeforlife-package-javascript#portal-frontend-70",
"crypto-js": "^4.2.0",
"qrcode": "^1.5.4"
},
Expand Down Expand Up @@ -64,4 +64,4 @@
"vite": "^5.0.11",
"vitest": "^1.2.0"
}
}
}
2 changes: 1 addition & 1 deletion src/api/authFactor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export type CreateAuthFactorArg = CreateArg<AuthFactor, "type"> & {
export type DestroyAuthFactorResult = DestroyResult
export type DestroyAuthFactorArg = DestroyArg<AuthFactor>

export type CheckIfAuthFactorExistsResult = boolean
export type CheckIfAuthFactorExistsResult = { auth_factor_exists: boolean }
export type CheckIfAuthFactorExistsArg = Arg<AuthFactor, "user" | "type">

export type GetOtpSecretResult = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const SetupCompleted: FC<SetupCompletedProps> = () => {
</Typography>
<LinkButton
to={paths.teacher.dashboard.tab.account._}
replace
sx={{ marginTop: 3 }}
>
OK
Expand Down
4 changes: 2 additions & 2 deletions src/pages/teacherDashboard/account/setupOtp/SetupOtp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ const SetupOtp: FC<SetupOtpProps> = ({ authUserId }) => {

return handleResultState(
useCheckIfAuthFactorExistsQuery({ user: authUserId, type: "otp" }),
otpExists =>
otpExists ? (
({ auth_factor_exists }) =>
auth_factor_exists ? (
<Navigate
to={paths.teacher.dashboard.tab.account._}
state={{
Expand Down
Loading

0 comments on commit 7402c38

Please sign in to comment.