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

New fix for fixing URLs with '//' #105

Merged
merged 1 commit into from
May 7, 2022
Merged

Conversation

vraravam
Copy link
Contributor

@vraravam vraravam commented May 6, 2022

Pre-flight Checklist

  1. Please remember that if you are logging a bug for some service that has stopped working or is working incorrectly, please log the bug here
  2. If you are requesting support for a new service in Ferdium, please log it here
  3. Please remember to read the self-help documentation - in case it helps you unblock yourself for issues related to older versions of recipes that were installed on your machine. (These will get automatically upgraded when you upgrade to the newer versions of Ferdium, but to get new recipes between Ferdium releases, this documentation is quite useful.)
  4. Please ensure you've completed all of the following.

Description of Change

Reverted previous fix from #103 and added new changes as per comment

Motivation and Context

Should now be a better fix for #102

Screenshots

Checklist

  • My pull request is properly named
  • The changes respect the code style of the project (npm run prepare-code)
  • npm test passes
  • I tested/previewed my changes locally

Release Notes

@vraravam vraravam requested a review from kris7t May 6, 2022 00:24
@vraravam vraravam self-assigned this May 6, 2022
@vraravam vraravam force-pushed the fix-102 branch 2 times, most recently from 7c20522 to dcb007e Compare May 6, 2022 03:25
@vraravam vraravam marked this pull request as draft May 6, 2022 03:30
@vraravam vraravam force-pushed the fix-102 branch 3 times, most recently from 4255cba to 7c7ab47 Compare May 6, 2022 15:38
@vraravam
Copy link
Contributor Author

vraravam commented May 6, 2022

Unfortunately, the changes seem to break the app while bootup itself - I dont use Ferdium with any account, but the initial login screen itself doesn't come up for me. I'm unable to take this forward (have travel plans this weekend). If someone can continue and find the fix, i would really appreciate it

@nathanaelhoun
Copy link
Contributor

nathanaelhoun commented May 7, 2022

Instead of fixing the URL everywhere we use it, I propose two alternatives approaches:

  1. Modify the form submission to remove a trailing slash (here) with a
    this.form.$('customServer').value = this.form.$('customServer').value.replace(/\/$/, "")
  2. Modify the apiBase() and termsBase() methods to remove the trailing slash before returning the value

@vraravam
Copy link
Contributor Author

vraravam commented May 7, 2022

2. Modify the apiBase() and termsBase() methods to remove the trailing slash before returning the value

OMG! Thanks for catching the rabbit hole that I was digging!
Will fix both in the next commit in a few mins

@vraravam vraravam marked this pull request as ready for review May 7, 2022 14:10
@vraravam
Copy link
Contributor Author

vraravam commented May 7, 2022

@nathanaelhoun - if you can review this and approve, we can merge for the next nightly

Copy link
Contributor

@nathanaelhoun nathanaelhoun left a comment

Choose a reason for hiding this comment

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

Looks good to me!

src/helpers/url-helpers.ts Show resolved Hide resolved
@vraravam vraravam merged commit a24c037 into ferdium:develop May 7, 2022
@vraravam vraravam deleted the fix-102 branch May 7, 2022 18:17
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.

None yet

2 participants