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

MVJ-245_paikkatietovipunen-urls-broken-fix #487

Merged
merged 3 commits into from
Jun 11, 2024

Conversation

robertrytovuori
Copy link
Contributor

createPaikkatietovipunenUrl to createPTPPlanReportUrl and createPTPPlotDivisionUrl

* @readonly
* @const {string}
*/
export const PAIKKATIETOVIPUNEN_URL = 'http://paikkatietovipunen.hel.fi:10058';
export const PTP_URL = 'https://ptp.hel.fi';
Copy link
Contributor

Choose a reason for hiding this comment

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

Here it would be really nice if we could figure out what PTP stands for and write it out in the variable to describe what this is

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed PTP_URL to PAIKKATIETOPALVELU_URL

* @returns {string}
*/
export const createPaikkatietovipunenUrl = (url: string): string => `${PAIKKATIETOVIPUNEN_URL}/${url}`;
export const createPTPPlanReportUrl = (reportId: string): string => `${PTP_URL}/DataForms/planreport/?id=${reportId}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Really like this approach, nice!

Copy link
Contributor

@henrinie-nc henrinie-nc left a comment

Choose a reason for hiding this comment

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

Very good refactor!
It would be helpful to try to write out what this PTP stands for, e.g. by renaming the constant. I don't know what it is, we should maybe ask :)

@henrinie-nc
Copy link
Contributor

@robertrytovuori This can be merged I suppose?

@robertrytovuori robertrytovuori merged commit 9dc2a57 into develop Jun 11, 2024
3 checks passed
@robertrytovuori robertrytovuori deleted the MVJ-345_paikkatietovipunen-urs-broken branch June 11, 2024 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants