audiosilo icon indicating copy to clipboard operation
audiosilo copied to clipboard

Make sure server URL always ends with '/'

Open bonukai opened this issue 3 years ago • 2 comments

bonukai avatar Oct 05 '21 13:10 bonukai

Might be helpful to add a comment on why this will work better.

KodeStar avatar Oct 05 '21 16:10 KodeStar

@KodeStar I do not know much about Vue.js, but from what I can see, server URL is set here: https://github.com/KodeStar/audiosilo/blob/1f1658a6d88103f8eee97e88d182011d801eb940/components/LoginStatus.vue#L50-L52 which in turn will call mutation here: https://github.com/KodeStar/audiosilo/blob/1f1658a6d88103f8eee97e88d182011d801eb940/store/app/mutations.js#L56-L58

If we add '/' there, then we can always assume, that state.server ends with '/' and we can join paths with '+' in those places: https://github.com/KodeStar/audiosilo/blob/4ea4e04c22c4a5ee2cc8c44b5e820621faf09396/plugins/audio.js#L70 https://github.com/KodeStar/audiosilo/blob/1f1658a6d88103f8eee97e88d182011d801eb940/store/app/getters.js#L6 https://github.com/KodeStar/audiosilo/blob/1f1658a6d88103f8eee97e88d182011d801eb940/store/app/actions.js#L54

My previous pull request did not realy fix it, it's still not possible to use URL without forward slash at the end, app will try to connect to https://audioserve.zderadicka.euauthenticate/

bonukai avatar Oct 05 '21 23:10 bonukai