try to add image mapping
This commit is contained in:
		
							parent
							
								
									49904865eb
								
							
						
					
					
						commit
						8ed0fa5de2
					
				
					 7 changed files with 71 additions and 3 deletions
				
			
		
							
								
								
									
										16
									
								
								pages/api/border/[id].js
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								pages/api/border/[id].js
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,16 @@ | |||
| import { getBorderById } from "../../../lib/borders"; | ||||
| 
 | ||||
| export default function handler(req, res) { | ||||
|     const id = req.query.id; | ||||
| 
 | ||||
|     console.log(id); | ||||
|    | ||||
|     getBorderById(id).then((result) => { | ||||
|       const imageName = result?.imageName ?? "default.png"; | ||||
| 
 | ||||
|       console.log(result, imageName); | ||||
|    | ||||
|       return res.status(200).json(result); | ||||
|     //   return res.redirect(301, `/images/${imageName}`)
 | ||||
|     }); | ||||
|   } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue