Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[angular] Clean up csrf.service #13107

Merged
merged 1 commit into from
Nov 20, 2020

Conversation

kaidohallik
Copy link
Contributor

Follow up to #13098

As CsrfService is now used only in very specific case then we need to clean it up for most cases.


Please make sure the below checklist is followed for Pull Requests.

When you are still working on the PR, consider converting it to Draft (bellow reviewers) and adding skip-ci label, you can still see CI build result at your branch.

As CsrfService is now used only in very specific case then we need to clean it up for the most use cases.
@kaidohallik kaidohallik merged commit bb2c65a into jhipster:main Nov 20, 2020
@kaidohallik kaidohallik deleted the cleanup-csrf-service branch November 20, 2020 10:08
@@ -118,6 +118,7 @@ function cleanupOldFiles(generator) {
generator.removeFile(`${ANGULAR_DIR}shared/login/login.component.ts`);
generator.removeFile(`${ANGULAR_DIR}shared/login/login.component.html`);
generator.removeFile(`${ANGULAR_DIR}core/auth/user-route-access-service.ts`);
generator.removeFile(`${ANGULAR_DIR}core/auth/csrf.service.ts`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn’t do this way, 2 options here:

  • remove when not needed
  • use this.fs.delete(this.destinationPath(...));

Otherwise any change to the file will be overwritten every regeneration.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, adding condition, will do PR shortly.

@pascalgrimaud pascalgrimaud added this to the 7.0.0-beta.0 milestone Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants