mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-27 23:20:56 +03:00
Fixed bug that caused users with large amounts of data to have extremely large tokens
Subfolders are now ensured to exist with the normal downloading method Initialization now happens after token retrieval to avoid failed requests Fixed bug that caused login to be called twice, introducing a possible race condition
This commit is contained in:
@@ -41,12 +41,15 @@ export class LoginComponent implements OnInit {
|
||||
}
|
||||
|
||||
login() {
|
||||
if (this.loginPasswordInput === '') {
|
||||
if (this.loginPasswordInput === '' || this.loggingIn) {
|
||||
return;
|
||||
}
|
||||
this.loggingIn = true;
|
||||
this.postsService.login(this.loginUsernameInput, this.loginPasswordInput).subscribe(res => {
|
||||
this.loggingIn = false;
|
||||
if (res['token']) {
|
||||
this.postsService.afterLogin(res['user'], res['token'], res['permissions'], res['available_permissions']);
|
||||
}
|
||||
}, err => {
|
||||
this.loggingIn = false;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user