Skip to content
This repository has been archived by the owner on Apr 1, 2022. It is now read-only.

Feature/user data login #38

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

Conversation

LarissaKoehne
Copy link
Contributor

No description provided.

@LarissaKoehne LarissaKoehne marked this pull request as ready for review May 24, 2019 11:51
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:5001;http://localhost:5000;http://localhost"
Copy link
Contributor

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?

Copy link
Contributor Author

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()
Copy link
Contributor

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

.AddHttpClient<IHistoricalDataService, HistoricalDataService>();
services
.AddHttpClient<IHistoricConditionsService, HistoricConditionsService>();
// services
Copy link
Contributor

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,
Copy link
Contributor

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 {
Copy link
Contributor

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";
Copy link
Contributor

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]
Copy link
Contributor

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
Copy link
Contributor

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 {
Copy link
Contributor

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',
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants