Skip to content

Commit

Permalink
update kit.svelte.dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Jul 15, 2022
1 parent 6353abf commit 3ba4c2b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion sites/kit.svelte.dev/src/routes/content.json.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const categories = [
}
];

export function get() {
export function GET() {
/** @type {import('$lib/search/types').Block[]} */
const blocks = [];

Expand Down
2 changes: 1 addition & 1 deletion sites/kit.svelte.dev/src/routes/docs/[slug].json.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { read } from '$lib/docs/server';

/** @type {import('@sveltejs/kit').RequestHandler} */
export async function get({ params }) {
export async function GET({ params }) {
const { prev, next, section } = await read('docs', params.slug);

return {
Expand Down
2 changes: 1 addition & 1 deletion sites/kit.svelte.dev/src/routes/docs/index.json.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { read_headings } from '$lib/docs/server';

export function get() {
export function GET() {
return {
body: read_headings('docs')
};
Expand Down
2 changes: 1 addition & 1 deletion sites/kit.svelte.dev/src/routes/faq/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { read_all } from '$lib/docs/server';

export async function get() {
export async function GET() {
return {
body: {
sections: await read_all('faq')
Expand Down
2 changes: 1 addition & 1 deletion sites/kit.svelte.dev/src/routes/search/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { init, inited, search } from '$lib/search/search';

/** @type {import('./__types/index').RequestHandler} */
export async function get({ url }) {
export async function GET({ url }) {
if (!inited) {
// TODO this feels a bit hacky, not sure if there's a better approach
const res = await fetch(`${url.origin}/content.json`);
Expand Down

0 comments on commit 3ba4c2b

Please sign in to comment.