Removed no longer needed stuff and fixed linting !wip

pull/2174/head
Jamie Rees 7 years ago
parent 5531af462c
commit f05a9a5090

@ -44,7 +44,6 @@ export class LoginComponent implements OnDestroy, OnInit {
return true; return true;
} }
this.loginWithOmbi = true; this.loginWithOmbi = true;
return true; return true;
} }
@ -145,7 +144,7 @@ export class LoginComponent implements OnDestroy, OnInit {
public oauth() { public oauth() {
this.authService.login({usePlexOAuth: true, password:"",rememberMe:true,username:""}).subscribe(x => { this.authService.login({usePlexOAuth: true, password:"",rememberMe:true,username:""}).subscribe(x => {
window.location.href = x.url; window.location.href = x.url;
}) });
} }
public ngOnDestroy() { public ngOnDestroy() {
@ -161,5 +160,4 @@ export class LoginComponent implements OnDestroy, OnInit {
.bypassSecurityTrustStyle("linear-gradient(-10deg, transparent 20%, rgba(0,0,0,0.7) 20.0%, rgba(0,0,0,0.7) 80.0%, transparent 80%), url(" + x.url + ")"); .bypassSecurityTrustStyle("linear-gradient(-10deg, transparent 20%, rgba(0,0,0,0.7) 20.0%, rgba(0,0,0,0.7) 80.0%, transparent 80%), url(" + x.url + ")");
}); });
} }
} }

@ -4,7 +4,7 @@ import { ActivatedRoute, Router } from "@angular/router";
import { AuthService } from "../auth/auth.service"; import { AuthService } from "../auth/auth.service";
@Component({ @Component({
templateUrl: "./loginoauth.component.html" templateUrl: "./loginoauth.component.html",
}) })
export class LoginOAuthComponent implements OnInit { export class LoginOAuthComponent implements OnInit {
public pin: number; public pin: number;
@ -18,7 +18,7 @@ export class LoginOAuthComponent implements OnInit {
}); });
} }
ngOnInit(): void { public ngOnInit(): void {
this.auth(); this.auth();
} }

@ -1,7 +1,6 @@
import { Component } from "@angular/core"; import { Component } from "@angular/core";
import { Router } from "@angular/router"; import { Router } from "@angular/router";
import { PlexService } from "../../services"; import { PlexService } from "../../services";
import { IdentityService, NotificationService, SettingsService } from "../../services"; import { IdentityService, NotificationService, SettingsService } from "../../services";
import { AuthService } from "./../../auth/auth.service"; import { AuthService } from "./../../auth/auth.service";
@ -27,7 +26,7 @@ export class PlexComponent {
return; return;
} }
this.identityService.createWizardUser({ this.identityService.createWizardUser({
username: "", username: "",
password: "", password: "",
usePlexAdminAccount: true, usePlexAdminAccount: true,
@ -57,7 +56,7 @@ export class PlexComponent {
return; return;
} }
}); });
} },
); );
} }

@ -1,7 +1,7 @@
import { Component, OnInit } from "@angular/core"; import { Component, OnInit } from "@angular/core";
import { ActivatedRoute, Router } from "@angular/router"; import { ActivatedRoute, Router } from "@angular/router";
import { PlexOAuthService, IdentityService, SettingsService } from "../../services"; import { IdentityService, PlexOAuthService, SettingsService } from "../../services";
import { AuthService } from "./../../auth/auth.service"; import { AuthService } from "./../../auth/auth.service";
@Component({ @Component({
@ -23,15 +23,14 @@ export class PlexOAuthComponent implements OnInit {
}); });
} }
ngOnInit(): void { public ngOnInit(): void {
this.plexOauth.oAuth(this.pinId).subscribe(x => { this.plexOauth.oAuth(this.pinId).subscribe(x => {
if(!x.accessToken) { if(!x.accessToken) {
return; return;
// RETURN // RETURN
} }
this.identityService.createWizardUser({
this.identityService.createWizardUser({
username: "", username: "",
password: "", password: "",
usePlexAdminAccount: true, usePlexAdminAccount: true,

@ -69,7 +69,6 @@ namespace Ombi.Controllers.External
_log.LogDebug("Adding first server"); _log.LogDebug("Adding first server");
settings.Enable = true; settings.Enable = true;
settings.UniqueInstallCode = Guid.NewGuid().ToString("N");
settings.Servers = new List<PlexServers> { settings.Servers = new List<PlexServers> {
new PlexServers new PlexServers
{ {

@ -143,10 +143,6 @@ namespace Ombi.Controllers
public async Task<PlexSettings> PlexSettings() public async Task<PlexSettings> PlexSettings()
{ {
var s = await Get<PlexSettings>(); var s = await Get<PlexSettings>();
if (s.UniqueInstallCode.IsNullOrEmpty())
{
s.UniqueInstallCode = Guid.NewGuid().ToString("N");
}
return s; return s;
} }

Loading…
Cancel
Save