try to add image mapping

This commit is contained in:
jane 2022-04-11 13:33:16 -04:00
parent 49904865eb
commit 8ed0fa5de2
7 changed files with 71 additions and 3 deletions

View file

@ -1,7 +1,14 @@
import { getServerSession } from "next-auth";
import { getSession } from "next-auth/react";
import prisma from "./prisma";
export const getBorderById = async (id) => {
return await prisma.borderImage.findFirst({
where: {
id: parseInt(id)
}
});
}
export const getUserBorders = async (req) => {
const session = await getSession({ req });
if (!session) {