Skip to content
Extraits de code Groupes Projets
Valider f314b0df rédigé par Steel's avatar Steel
Parcourir les fichiers

1/0A

parent cee925ce
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -36,3 +36,22 @@ npm run build ...@@ -36,3 +36,22 @@ npm run build
You can preview the production build with `npm run preview`. You can preview the production build with `npm run preview`.
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. > To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
```graphql
mutation createToken {
createToken(
token: {
id: "quiestce"
description: "Qui est-ce | photos & pseudos"
claims: [
{ claim: "users.id", access: READ }
{ claim: "users.nickname", access: READ }
{ claim: "users.photo", access: READ }
]
allowedIps: ["0.0.0.0/0"]
}
) {
base64
}
}
```
...@@ -36,3 +36,11 @@ export const USER_DETAILS_QUERY = graphql(` ...@@ -36,3 +36,11 @@ export const USER_DETAILS_QUERY = graphql(`
} }
} }
`); `);
export const INTE_QUERY = graphql(`
query Inte {
globalsValues {
integration
}
}
`);
...@@ -6,6 +6,9 @@ import { Game, GameStage } from "$lib/game"; ...@@ -6,6 +6,9 @@ import { Game, GameStage } from "$lib/game";
import { getPromotion } from "$lib/data"; import { getPromotion } from "$lib/data";
import images from "./images"; import images from "./images";
import { sum } from "$lib/utils"; import { sum } from "$lib/utils";
import { client } from "$lib/graphql";
import { INTE_QUERY } from "$lib/graphql/queries";
import { handleGqlError } from "$lib/graphql/error";
type BaseLevel = { type BaseLevel = {
year: number; year: number;
...@@ -28,10 +31,16 @@ export async function load(event) { ...@@ -28,10 +31,16 @@ export async function load(event) {
if (game.state.stage !== GameStage.NEW) redirect(303, "/quiz"); if (game.state.stage !== GameStage.NEW) redirect(303, "/quiz");
const globals = await client.query(INTE_QUERY, {});
handleGqlError(globals);
const { integration } = globals.data!.globalsValues;
const zeroA = integration ? 0 : 1;
const baseLevels: BaseLevel[] = [ const baseLevels: BaseLevel[] = [
{ {
year: 1, year: zeroA,
name: "1A", name: `${zeroA}A`,
image: images.stroller, image: images.stroller,
}, },
{ {
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter