This commit is contained in:
jane 2022-04-16 18:29:21 -04:00
parent 379dcdcd51
commit 01e778edad
6 changed files with 56 additions and 49 deletions

View file

@ -4,10 +4,14 @@ import prisma from "./prisma";
export const getBorderById = async (id) => {
return await prisma.borderImage.findFirst({
where: {
id: parseInt(id)
}
id: parseInt(id),
},
});
}
};
export const getAllBorders = async () => {
return await prisma.borderImage.findMany();
};
export const getUserBorders = async (req) => {
const session = await getSession({ req });