Skip to content

Commit

Permalink
Merge pull request #1200 from syntaxfm/issue-1198
Browse files Browse the repository at this point in the history
reinstate old url structure. Fixes #1198
  • Loading branch information
wesbos authored Oct 19, 2023
2 parents 1dbede2 + 31492a1 commit 80b1f14
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
12 changes: 4 additions & 8 deletions src/routes/(site)/show/[...all]/+page.server.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import { redirect } from '@sveltejs/kit';
import type { PageServerLoad } from '../$types';
import type { PageServerLoad } from '../../shows/$types';

export const load: PageServerLoad = async function ({ params, locals, setHeaders }) {
setHeaders({
'cache-control': 'max-age=240'
});

const { all } = params;
throw redirect(302, `/shows/${all}`);
export const load: PageServerLoad = async function () {
// They visited /show, redirect to /shows
throw redirect(302, `/shows`);
};
2 changes: 1 addition & 1 deletion src/utilities/slug.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export default function get_show_path(show: { number: number; slug: string }) {
return `/shows/${show.number}/${show.slug}`;
return `/show/${show.number}/${show.slug}`;
}

1 comment on commit 80b1f14

@vercel
Copy link

@vercel vercel bot commented on 80b1f14 Oct 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

syntax-website-v2 – ./

syntax-website-v2-syntax.vercel.app
syntax-website-v2-git-v2-syntax.vercel.app
beta.syntax.fm

Please sign in to comment.