-
Notifications
You must be signed in to change notification settings - Fork 4
Feature/user data login #38
base: master
Are you sure you want to change the base?
Conversation
(scenarios and user stuff)
removes unnecessary usings
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development" | ||
}, | ||
"applicationUrl": "https://localhost:5001;http://localhost:5000;http://localhost" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- where there any changes? why was this added?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The redirect after the login or logout is only possible to "localhost", so I had to add this to do the redirect.
[Route("api/[controller]")] | ||
public sealed class LogoutController : Controller | ||
{ | ||
public LogoutController() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Do we need this empty method?
- I think backend will populate the route for frontend anyway
src/web/Startup.cs
Outdated
.AddHttpClient<IHistoricalDataService, HistoricalDataService>(); | ||
services | ||
.AddHttpClient<IHistoricConditionsService, HistoricConditionsService>(); | ||
// services |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove comment from code
@NgModule({ | ||
declarations: [ScenarioUserDataComponent], | ||
imports: [ | ||
CommonModule, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should already be imported/exported in shared module
@Injectable({ | ||
providedIn: 'root' | ||
}) | ||
export class ScenarioUserdataService { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo -> "Data" + see other files for same service
} | ||
|
||
logout() { | ||
const redirectUri = window.location.origin + "/scenario-userdata/logout"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would like to get rid ot the window.* object in favor of using angular angular router.createUrlTree
|
||
@NgModule({ | ||
declarations: [LogoutComponent], | ||
imports: [CommonModule, LogoutRoutingModule, SharedModule] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove CommonModule due to import/export in shared module
this.router.navigate(["/scenario-userdata"]); | ||
// successfully authenticated | ||
} | ||
// todo: handle logout param |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whats todo there?
templateUrl: "./scenario-userdata.component.html" | ||
}) | ||
export class ScenarioUserDataComponent implements OnInit, OnDestroy { | ||
ngOnDestroy(): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move below class fields
loadChildren: "./scenario-historicaldata/scenario-historicaldata.module#ScenarioHistoricaldataModule" | ||
}, | ||
{ | ||
path: 'scenario-machinestate', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use single or double quotes. i would prefer double quotes, because single quotes remembers me of c character initialization and not a string :D
No description provided.