minor change
This commit is contained in:
parent
988d647521
commit
0579395e93
|
@ -1,7 +1,6 @@
|
|||
import type { NextApiRequest, NextApiResponse } from "next";
|
||||
import { prisma } from "@/lib/api/db";
|
||||
import readFile from "@/lib/api/storage/readFile";
|
||||
import verifyUser from "@/lib/api/verifyUser";
|
||||
import { getToken } from "next-auth/jwt";
|
||||
|
||||
export default async function Index(req: NextApiRequest, res: NextApiResponse) {
|
||||
|
@ -16,6 +15,7 @@ export default async function Index(req: NextApiRequest, res: NextApiResponse) {
|
|||
const token = await getToken({ req });
|
||||
const userId = token?.id;
|
||||
|
||||
if (req.method === "GET") {
|
||||
const targetUser = await prisma.user.findUnique({
|
||||
where: {
|
||||
id: queryId,
|
||||
|
@ -70,3 +70,4 @@ export default async function Index(req: NextApiRequest, res: NextApiResponse) {
|
|||
.status(status as number)
|
||||
.send(file);
|
||||
}
|
||||
}
|
||||
|
|
Ŝarĝante…
Reference in New Issue