✨ feat: add automatic thumbnail generation
All checks were successful
Integration Tests / integration-tests (pull_request) Successful in 57s
All checks were successful
Integration Tests / integration-tests (pull_request) Successful in 57s
This commit is contained in:
@ -0,0 +1,18 @@
|
||||
import { Prisma } from "@prisma/client";
|
||||
import { AppError } from "../../../../helpers/error/instances/app";
|
||||
import { episodeModel } from "../../episode.model";
|
||||
|
||||
export const updateEpisodeRepository = async (
|
||||
payload: Prisma.EpisodeUncheckedUpdateInput,
|
||||
) => {
|
||||
try {
|
||||
return await episodeModel.update({
|
||||
where: {
|
||||
id: payload.id as string,
|
||||
},
|
||||
data: payload,
|
||||
});
|
||||
} catch (error) {
|
||||
throw new AppError(500, "Failed to edit episode", error);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user