added redirection to url root
This commit is contained in:
parent
a23db9b30e
commit
bbfb4bc026
|
@ -101,7 +101,7 @@ export class AddNewAccountComponent implements OnInit {
|
|||
if (instanceApps.length !== 0) {
|
||||
return Promise.resolve(instanceApps[0].app);
|
||||
} else {
|
||||
const redirect_uri = this.getLocalHostname() + '/register';
|
||||
const redirect_uri = this.getLocalHostname();
|
||||
return this.authService.createNewApplication(instance, 'Sengi', redirect_uri, 'read write follow', 'https://nicolasconstant.github.io/sengi/')
|
||||
.then((appData: AppData) => {
|
||||
return this.saveNewApp(instance, appData)
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { Component, OnInit, OnDestroy, QueryList, ViewChildren, ElementRef } from "@angular/core";
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { Observable, Subscription } from "rxjs";
|
||||
import { Select } from "@ngxs/store";
|
||||
import scrollIntoView from "smooth-scroll-into-view-if-needed";
|
||||
|
@ -19,10 +20,20 @@ export class StreamsMainDisplayComponent implements OnInit, OnDestroy {
|
|||
private columnSelectedSub: Subscription;
|
||||
|
||||
constructor(
|
||||
private readonly router: Router,
|
||||
private readonly activatedRoute: ActivatedRoute,
|
||||
private readonly navigationService: NavigationService) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.activatedRoute.queryParams.subscribe(params => {
|
||||
const code = params['code'];
|
||||
if (code) {
|
||||
this.router.navigate(['/register'], { queryParams: { code: code} });
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
this.columnSelectedSub = this.navigationService.columnSelectedSubject.subscribe((columnIndex: number) => {
|
||||
this.focusOnColumn(columnIndex);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue