diff options
| author | Factiven <[email protected]> | 2024-01-11 14:23:15 +0700 |
|---|---|---|
| committer | Factiven <[email protected]> | 2024-01-11 14:23:15 +0700 |
| commit | e9aea5ffe32cf43ae0ac0f3d692ea6c9202bc579 (patch) | |
| tree | 0f792b478c2dfa20ddad0f20abb9a82b1024817f /prisma/removed.ts | |
| parent | feat: Add PreviousEpisode and NextEpisode to media controls (#111) (diff) | |
| download | moopa-e9aea5ffe32cf43ae0ac0f3d692ea6c9202bc579.tar.xz moopa-e9aea5ffe32cf43ae0ac0f3d692ea6c9202bc579.zip | |
Add getRemovedMedia function and handle redirect for removed media
Diffstat (limited to 'prisma/removed.ts')
| -rw-r--r-- | prisma/removed.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/prisma/removed.ts b/prisma/removed.ts new file mode 100644 index 0000000..b6e31be --- /dev/null +++ b/prisma/removed.ts @@ -0,0 +1,10 @@ +import { prisma } from "@/lib/prisma"; + +export const getRemovedMedia = async (): Promise<any | null> => { + try { + const removedMedia = await prisma.removedMedia.findMany(); + return removedMedia; + } catch (error) { + return null; + } +}; |