aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend/api/api/Services/TempRemovalService.cs2
-rw-r--r--frontend/src/app/_services/auth.service.ts10
-rw-r--r--frontend/src/app/app.component.ts2
3 files changed, 3 insertions, 11 deletions
diff --git a/backend/api/api/Services/TempRemovalService.cs b/backend/api/api/Services/TempRemovalService.cs
index 525ff386..9e6b7f96 100644
--- a/backend/api/api/Services/TempRemovalService.cs
+++ b/backend/api/api/Services/TempRemovalService.cs
@@ -29,7 +29,7 @@ namespace api.Services
List<User> tempUsers=_user.Find(u=>u.isPermament==false).ToList();
foreach (User user in tempUsers)
{
- if ((DateTime.Now.ToUniversalTime() - user.dateCreated).TotalMinutes < 1)
+ if ((DateTime.Now.ToUniversalTime() - user.dateCreated).TotalDays < 1)
continue;
List<Predictor> tempPredictors=_predictor.Find(p=>p.uploaderId==user._id).ToList();
List<Model> tempModels=_model.Find(m=>m.uploaderId==user._id).ToList();
diff --git a/frontend/src/app/_services/auth.service.ts b/frontend/src/app/_services/auth.service.ts
index 845cb3f5..92920b24 100644
--- a/frontend/src/app/_services/auth.service.ts
+++ b/frontend/src/app/_services/auth.service.ts
@@ -52,21 +52,13 @@ export class AuthService {
}
var property = jwtHelper.decodeToken(this.cookie.get('token'));
var username = property['name'];
- if (username != "") {
this.refresher = setTimeout(() => {
this.http.post(`${Configuration.settings.apiURL}/auth/renewJwt`, {}, { headers: this.authHeader(), responseType: 'text' }).subscribe((response) => {
this.authenticate(response);
});
}, exp.getTime() - new Date().getTime() - 60000);
- }
- else {
- this.refresher = setTimeout(() => {
- this.getGuestToken().subscribe((response) => {
- this.authenticate(response);
- });
- }, exp.getTime() - new Date().getTime() - 60000);
- }
+
}
addGuestToken() {
diff --git a/frontend/src/app/app.component.ts b/frontend/src/app/app.component.ts
index e301b46f..dfe4febc 100644
--- a/frontend/src/app/app.component.ts
+++ b/frontend/src/app/app.component.ts
@@ -43,7 +43,7 @@ export class AppComponent implements OnInit, AfterViewInit {
if(!this.authService.alreadyGuest())
this.authService.addGuestToken();
}
- this.signalRService.startConnection();
+ //this.signalRService.startConnection();
//this.startHttpRequest();
}
}