Rename methods and fix save bug

This commit is contained in:
mfcar 2024-05-12 00:39:49 +01:00
parent 00bfb5ced4
commit 9ff5f2fc37
No known key found for this signature in database
7 changed files with 69 additions and 69 deletions

View file

@ -3,7 +3,7 @@ const { DataTypes, Model } = require('sequelize')
/**
* @typedef PodcastExpandedProperties
* @property {import('./PodcastEpisode')[]} podcastEpisodes
*
*
* @typedef {Podcast & PodcastExpandedProperties} PodcastExpanded
*/
@ -127,7 +127,7 @@ class Podcast extends Model {
}
}
static async getAllIncomingFeeds() {
static async getAllIWithFeedSubscriptions() {
const podcasts = await this.findAll()
const podcastsFiltered = podcasts.filter(p => p.dataValues.feedURL !== null);
return podcastsFiltered.map(p => this.getOldPodcast({media: p.dataValues}))
@ -154,7 +154,7 @@ class Podcast extends Model {
/**
* Initialize model
* @param {import('../Database').sequelize} sequelize
* @param {import('../Database').sequelize} sequelize
*/
static init(sequelize) {
super.init({