mirror of
https://github.com/iptv-org/iptv-org.github.io.git
synced 2025-05-11 17:40:05 -04:00
Create +page.js
This commit is contained in:
parent
e2e50a493d
commit
46c3780592
1 changed files with 9 additions and 0 deletions
9
src/pages/channel/+page.js
Normal file
9
src/pages/channel/+page.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
import { redirect } from '@sveltejs/kit'
|
||||
|
||||
export function load({ url }) {
|
||||
const id = url.searchParams.get('id')
|
||||
const [name, country] = id.split('.')
|
||||
const redirectUrl = `/channels/${country}/${name}`
|
||||
|
||||
throw redirect(302, redirectUrl)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue