Skip to content

Commit 096b330

Browse files
committed
Avoid duplicate slash at the end of the openproject url
https://community.openproject.org/wp/67371
1 parent 0dc4712 commit 096b330

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)