Skip to content

Commit

Permalink
add async await
Browse files Browse the repository at this point in the history
  • Loading branch information
birdpump committed May 1, 2024
1 parent 205e436 commit b2869a0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/routes/(app)/register/views/View1.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
input1.value = "";
input1.placeholder = jsonResponse.error;
} else if (response.ok) {
checkGrade(jsonResponse.grade);
await checkGrade(jsonResponse.grade);
if (gradeCanRegister) {
studentId1.set(student1);
await sendVerification($studentId1);
Expand All @@ -81,7 +81,7 @@
let response = await validateID(student1);
const jsonResponse = await response.json();
if (response.status === 400) {
checkGrade(jsonResponse.grade);
await checkGrade(jsonResponse.grade);
status = false;
input1.style.borderColor = "red";
input1.value = "";
Expand All @@ -101,7 +101,7 @@
let response = await validateID(student2);
const jsonResponse = await response.json();
if (response.status === 400) {
checkGrade(jsonResponse.grade);
await checkGrade(jsonResponse.grade);
status = false;
input2.style.borderColor = "red";
input2.value = "";
Expand Down

0 comments on commit b2869a0

Please sign in to comment.