We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7b95c60 commit dc1cd40Copy full SHA for dc1cd40
frontend/src/api/utils.js
@@ -62,7 +62,11 @@ export function removePrefix(url) {
62
}
63
64
export function createURL(endpoint, params = {}, auth = true) {
65
- const url = new URL(encodePath(endpoint), origin + baseURL);
+ let prefix = baseURL;
66
+ if (prefix[prefix.length] !== "/") {
67
+ prefix = prefix + "/";
68
+ }
69
+ const url = new URL(prefix + encodePath(endpoint), origin);
70
71
const searchParams = {
72
...(auth && { auth: store.state.jwt }),
0 commit comments