Skip to content

Commit

Permalink
update verification for ids
Browse files Browse the repository at this point in the history
  • Loading branch information
birdpump committed May 21, 2024
1 parent e96e43f commit 579f96e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/routes/verify/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
let showError = false;
let visible = true;
async function verify(token) {
async function verify(token, studentId) {
try {
const response = await fetch(`https://locker-api.cvapps.net/public/verify-student/${token}`);
const response = await fetch(`https://locker-api.cvapps.net/public/verify-student/${token}/${studentId}`);
if (response.ok) {
message = 'Verification Succeeded';
visible = false;
Expand All @@ -28,8 +28,9 @@
}
onMount(() => {
const param1Value = $page.url.searchParams.get('token');
verify(param1Value);
const token = $page.url.searchParams.get('token');
const studentId = $page.url.searchParams.get('studentId');
verify(token, studentId);
});
</script>
<svelte:head>
Expand Down

0 comments on commit 579f96e

Please sign in to comment.