Skip to content

Commit

Permalink
add prerender variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniele Ciminieri committed Sep 18, 2024
1 parent 2d3b18a commit 7728337
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/routes/api/corsi/+server.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { client } from '$lib/sanityClient';
import { getCorsi } from '$lib/sanityQueries';
import { json, error } from '@sveltejs/kit';

export const prerender = true;
export async function GET({ params, setHeaders, fetch }) {
const data = await client.fetch(
`{
Expand Down
2 changes: 1 addition & 1 deletion src/routes/api/gruppi/+server.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { client } from '$lib/sanityClient';
import { getGruppi } from '$lib/sanityQueries';


export const prerender = true;
export async function GET({ params, setHeaders, fetch }) {
const data = await client.fetch(
getGruppi(params.corsoId)
Expand Down
2 changes: 1 addition & 1 deletion src/routes/api/gruppi/[slug]/+server.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { error, json } from '@sveltejs/kit';
import { client } from '$lib/sanityClient';
import { getGruppi } from '$lib/sanityQueries';

export const prerender = true;
export async function GET({ params }) {
const { slug } = params;

Expand Down

0 comments on commit 7728337

Please sign in to comment.