feat: plex watchlist sync integration (#2885)

This commit is contained in:
Ryan Cohen
2022-08-21 16:33:49 +09:00
committed by GitHub
parent 7943e0c339
commit 301f2bf7ab
35 changed files with 1325 additions and 320 deletions

View File

@@ -14,7 +14,9 @@ const prepareDb = async () => {
// Connect to DB and seed test data
const dbConnection = await dataSource.initialize();
await dbConnection.dropDatabase();
if (process.env.PRESERVE_DB !== 'true') {
await dbConnection.dropDatabase();
}
// Run migrations in production
if (process.env.WITH_MIGRATIONS === 'true') {
@@ -41,9 +43,11 @@ const prepareDb = async () => {
// Create the other user
const otherUser = new User();
otherUser.plexId = 1;
otherUser.plexToken = '1234';
otherUser.plexUsername = 'friend';
otherUser.username = 'friend';
otherUser.email = 'friend@seerr.dev';
otherUser.userType = UserType.LOCAL;
otherUser.userType = UserType.PLEX;
await otherUser.setPassword('test1234');
otherUser.permissions = 32;
otherUser.avatar = 'https://plex.tv/assets/images/avatar/default.png';