Backend: Implement async error handling wrapper and refactor entry and media controllers to use it

This commit is contained in:
X4Lo committed 2026-03-30 17:25:46 +01:00
1 parent ad58164df4
commit 4a1d2bc614
8 files changed
+92 -33

No files matched your search

+3
View File
@@ -121,6 +121,7 @@ class EntryService {
async createEntry(data, plain = true) {
// creating the object
var is_tvseries = data.release_date == null ? true : false;
console.log('entryService > createEntry > is_tvseries: ', is_tvseries);
let movie = Entry.build({
title: data.title || data.name,
@@ -147,6 +148,8 @@ class EntryService {
let savedEntry = await movie.save();
console.log('entryService > createEntry > savedEntry: ', savedEntry);
// ? ids
await EntryId.create({
entry_id: savedEntry.id,