Skip to content

Commit

Permalink
get grades from api
Browse files Browse the repository at this point in the history
  • Loading branch information
birdpump committed Apr 5, 2024
1 parent b37d1f7 commit d61f1d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/lib/services/app/mainApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export async function validateID(data){
}

export async function fetchEnabledGrades() {
const response = await fetch('https://locker-api.cvapps.net/public/grade-restrictions', {
const response = await fetch('https://locker-api.cvapps.net/public/avalible-grades', {
method: 'get',
});

Expand Down
12 changes: 3 additions & 9 deletions src/routes/(app)/register/views/Status.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,19 @@
import {onMount} from "svelte";
import { fade } from "svelte/transition";
import { quartOut } from "svelte/easing";
//todo import fetch
import {fetchEnabledGrades} from "$lib/services/app/mainApi.js";
const dispatch = createEventDispatcher();
const gradesStore = writable({
grade_9: false,
grade_10: true,
grade_11: true,
grade_12: true,
});
const gradesStore = writable({});
function next(){
dispatch("message", {page: 0});
}
onMount(async () => {
// gradesStore.set(await fetchEnabledGrades());
gradesStore.set(await fetchEnabledGrades());
});
</script>

Expand Down

0 comments on commit d61f1d2

Please sign in to comment.