Skip to content

Commit

Permalink
Redirect old note permalinks to embeds
Browse files Browse the repository at this point in the history
  • Loading branch information
eyeseast committed Dec 3, 2024
1 parent 9a8361b commit 6c5d5a3
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/routes/(app)/documents/[id]/annotations/[note_id]/+page.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { redirect } from "@sveltejs/kit";

import { EMBED_URL } from "@/config/config.js";

// redirect to embed route
export function load({ url }) {
const u = new URL(url);

u.searchParams.set("embed", "1");
u.hostname = EMBED_URL;

return redirect(302, u);
}

0 comments on commit 6c5d5a3

Please sign in to comment.