mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-06 10:01:27 +03:00
Fixed bug where checking admin creation status would not run
This commit is contained in:
@@ -81,6 +81,7 @@ export class PostsService implements CanActivate {
|
|||||||
if (result) {
|
if (result) {
|
||||||
this.config = result['YoutubeDLMaterial'];
|
this.config = result['YoutubeDLMaterial'];
|
||||||
if (this.config['Advanced']['multi_user_mode']) {
|
if (this.config['Advanced']['multi_user_mode']) {
|
||||||
|
this.checkAdminCreationStatus();
|
||||||
// login stuff
|
// login stuff
|
||||||
if (localStorage.getItem('jwt_token') && localStorage.getItem('jwt_token') !== 'null') {
|
if (localStorage.getItem('jwt_token') && localStorage.getItem('jwt_token') !== 'null') {
|
||||||
this.token = localStorage.getItem('jwt_token');
|
this.token = localStorage.getItem('jwt_token');
|
||||||
@@ -403,7 +404,6 @@ export class PostsService implements CanActivate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sendToLogin() {
|
sendToLogin() {
|
||||||
this.checkAdminCreationStatus();
|
|
||||||
if (!this.initialized) {
|
if (!this.initialized) {
|
||||||
this.setInitialized();
|
this.setInitialized();
|
||||||
}
|
}
|
||||||
@@ -433,8 +433,8 @@ export class PostsService implements CanActivate {
|
|||||||
password: password}, this.httpOptions);
|
password: password}, this.httpOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
checkAdminCreationStatus(skip_check = false) {
|
checkAdminCreationStatus() {
|
||||||
if (!skip_check && !this.config['Advanced']['multi_user_mode']) {
|
if (!this.config['Advanced']['multi_user_mode']) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.adminExists().subscribe(res => {
|
this.adminExists().subscribe(res => {
|
||||||
|
|||||||
Reference in New Issue
Block a user