Skip to content
Extraits de code Groupes Projets
+page.ts 358 octets
Newer Older
  • Learn to ignore specific revisions
  • Brieuc Dubois's avatar
    Brieuc Dubois a validé
    import { getTestQuestionsAPI } from '$lib/api/tests';
    import { type Load } from '@sveltejs/kit';
    import { TestTaskQuestion } from '$lib/types/testTaskQuestions';
    
    export const load: Load = async ({ fetch }) => {
    	const questionsRaw = await getTestQuestionsAPI(fetch);
    	const questions = TestTaskQuestion.parseAll(questionsRaw);
    
    	return {
    		questions
    	};
    };