fix: update for new typeorm import/selects

feature/watchlist-sync
Ryan Cohen 2 years ago
parent fa50e3ccb7
commit 9efa91563b

@ -1,4 +1,4 @@
import { getRepository, Not } from 'typeorm'; import { Not } from 'typeorm';
import PlexTvAPI from '../api/plextv'; import PlexTvAPI from '../api/plextv';
import { User } from '../entity/User'; import { User } from '../entity/User';
import Media from '../entity/Media'; import Media from '../entity/Media';
@ -13,6 +13,7 @@ import {
RequestPermissionError, RequestPermissionError,
} from '../entity/MediaRequest'; } from '../entity/MediaRequest';
import { Permission } from './permissions'; import { Permission } from './permissions';
import { getRepository } from '../datasource';
class WatchlistSync { class WatchlistSync {
public async syncWatchlist() { public async syncWatchlist() {
@ -20,7 +21,7 @@ class WatchlistSync {
// Get users who actually have plex tokens // Get users who actually have plex tokens
const users = await userRepository.find({ const users = await userRepository.find({
select: ['id', 'plexToken', 'permissions'], select: { id: true, plexToken: true, permissions: true },
where: { where: {
plexToken: Not(''), plexToken: Not(''),
}, },

Loading…
Cancel
Save