Add CRUD for albums

This commit is contained in:
2025-06-25 00:28:32 +02:00
parent 0700592ebe
commit 27535e45f0
12 changed files with 402 additions and 1 deletions

View File

@ -0,0 +1,16 @@
"use server"
import prisma from "@/lib/prisma";
import { albumSchema } from "@/schemas/albums/albumSchema";
import * as z from "zod/v4";
export async function createAlbum(values: z.infer<typeof albumSchema>) {
return await prisma.album.create({
data: {
name: values.name,
slug: values.slug,
description: values.description,
galleryId: values.galleryId
}
})
}