Backend: Implement async error handling wrapper and refactor entry and media controllers to use it
This commit is contained in:
1 parent
ad58164df4
commit
4a1d2bc614
8 files changed
+92
-33
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user