mirror of
				https://github.com/DerTyp7/explainegy-nextjs.git
				synced 2025-10-31 05:37:12 +01:00 
			
		
		
		
	z
This commit is contained in:
		
							
								
								
									
										11
									
								
								pages/api/images/index.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								pages/api/images/index.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | ||||
| import { Request, Response } from "express"; | ||||
| import prisma from "../../../lib/prisma"; | ||||
| import { Prisma } from "@prisma/client"; | ||||
|  | ||||
| export default async function handler(req: Request, res: Response) { | ||||
|   res.setHeader("Content-Type", "application/json"); | ||||
|  | ||||
|   if (req.method == "GET") { | ||||
|     res.send(await prisma.image.findMany()) | ||||
|   } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Janis
					Janis