Update controllers to use toOldJSON functions

This commit is contained in:
advplyr 2025-01-04 15:20:41 -06:00
parent 7fae25a726
commit 6d52f88a96
20 changed files with 277 additions and 202 deletions

View file

@ -1200,7 +1200,7 @@ async function migrationPatchNewColumns(queryInterface) {
*/
async function handleOldLibraryItems(ctx) {
const oldLibraryItems = await oldDbFiles.loadOldData('libraryItems')
const libraryItems = await ctx.models.libraryItem.getAllOldLibraryItems()
const libraryItems = (await ctx.models.libraryItem.findAllExpandedWhere()).map((li) => ctx.models.libraryItem.getOldLibraryItem(li))
const bulkUpdateItems = []
const bulkUpdateEpisodes = []