feat: create bulk insert for episode endpoint

This commit is contained in:
2026-01-29 13:00:19 +07:00
parent 1485971cb7
commit 5c7e82cd52
14 changed files with 169 additions and 20 deletions

View File

@ -0,0 +1,12 @@
import { AppError } from "../../../../helpers/error/instances/app";
import { mediaModel } from "../../model";
export const getMediaByMalIdRepository = async (mal_id: number) => {
try {
return await mediaModel.findUnique({
where: { malId: mal_id },
});
} catch (err) {
throw new AppError(500, "Failed to get media by MAL ID", err);
}
};