mroe types, maybe shortens??

This commit is contained in:
Joshua 2022-09-14 23:25:35 +02:00
parent 72bff940ae
commit 93de6aeb7a
4 changed files with 27 additions and 0 deletions

10
src/routes/s/[slug].ts Normal file
View file

@ -0,0 +1,10 @@
import { pogo } from "../../../deps.ts"
import { Pika, database } from "../../../utils/index.ts"
export const method = ['*']
export const handler = (req: pogo.Request) => {
// console.log(`${req.params.slug}`)
console.log(Pika.gen("shorten"))
return `${req.params.slug}`
}

7
src/routes/s/index.ts Normal file
View file

@ -0,0 +1,7 @@
export const method = ['*']
export const handler = () => {
return {
name: "Lio",
url: "lio.cat"
}
}

5
utils/types/PageRoute.ts Normal file
View file

@ -0,0 +1,5 @@
export default interface PageRoute {
method: string | string[]
handler: void | any
route: string
}

5
utils/types/Shorten.ts Normal file
View file

@ -0,0 +1,5 @@
export default interface Shorten {
id: string
target: string
slug: string
}