mirror of
				https://github.com/DerTyp7/explainegy-nextjs.git
				synced 2025-10-30 21:27:12 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			11 lines
		
	
	
		
			330 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
		
			330 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| 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())
 | |
|   }
 | |
| } | 
