Major Backend Single Responsibility Update part 1
This commit is contained in:
1 parent
65177c7553
commit
cbdffb21e3
41 files changed
+1723
-888
No files matched your search
@@ -326,6 +326,7 @@ async function updateEntry(oldEntry, data) {
|
||||
return savedEntry;
|
||||
}
|
||||
|
||||
// ! this will soon be removed to the new EntryService
|
||||
async function refrechEntry(entryId) {
|
||||
// ? checking if the provied id is valid
|
||||
// ! note: the includes are required for the update
|
||||
@@ -795,24 +796,10 @@ async function SyncSerieData(entryId) {
|
||||
return oldEntry;
|
||||
}
|
||||
|
||||
async function getEntry(id) {
|
||||
return Entry.findByPk(id);
|
||||
}
|
||||
|
||||
async function deleteEntry(id) {
|
||||
await Entry.destroy({
|
||||
where: {
|
||||
id: id
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
saveEntry,
|
||||
updateEntry,
|
||||
refrechEntry,
|
||||
getEntry,
|
||||
deleteEntry,
|
||||
SyncSeriesData,
|
||||
SyncSerieData,
|
||||
}
|
||||
Reference in new issue
Block a user