Skip to content

Commit 5ab0f82

Browse files
authored
Merge pull request #31 from opf/jr/clean-openproject-url
Avoid duplicate slash at the end of the openproject url during [#67371] Use real open project URL for api calls https://community.openproject.org/work_packages/67371
2 parents 0dc4712 + 096b330 commit 5ab0f82

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/services/openProjectApi.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ let baseUrl = "https://openproject.local";
55

66
export function initOpenProjectApi(config: { baseUrl: string }) {
77
baseUrl = config.baseUrl;
8+
if (baseUrl.endsWith('/')) {
9+
baseUrl = baseUrl.slice(0, -1);
10+
}
811
}
912

1013
async function get<T>(endpoint: string): Promise<T> {

0 commit comments

Comments
 (0)