mroe types, maybe shortens??
This commit is contained in:
		
							parent
							
								
									72bff940ae
								
							
						
					
					
						commit
						93de6aeb7a
					
				
					 4 changed files with 27 additions and 0 deletions
				
			
		
							
								
								
									
										10
									
								
								src/routes/s/[slug].ts
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								src/routes/s/[slug].ts
									
										
									
									
									
										Normal 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
									
								
							
							
						
						
									
										7
									
								
								src/routes/s/index.ts
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,7 @@ | ||||||
|  | export const method = ['*'] | ||||||
|  | export const handler = () => { | ||||||
|  |     return { | ||||||
|  |         name: "Lio", | ||||||
|  |         url: "lio.cat" | ||||||
|  |     } | ||||||
|  | } | ||||||
							
								
								
									
										5
									
								
								utils/types/PageRoute.ts
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								utils/types/PageRoute.ts
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,5 @@ | ||||||
|  | export default interface PageRoute { | ||||||
|  |     method: string | string[] | ||||||
|  |     handler: void | any | ||||||
|  |     route: string | ||||||
|  | } | ||||||
							
								
								
									
										5
									
								
								utils/types/Shorten.ts
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								utils/types/Shorten.ts
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,5 @@ | ||||||
|  | export default interface Shorten { | ||||||
|  |     id: string | ||||||
|  |     target: string | ||||||
|  |     slug: string | ||||||
|  | } | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue