mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 14:35:45 +01:00
implement createSession of ScmClientProvider
This commit is contained in:
@@ -40,6 +40,9 @@ package sonia.scm.client;
|
||||
public class ScmUrlProvider
|
||||
{
|
||||
|
||||
/** Field description */
|
||||
public static final String API_PATH = "/api/rest/";
|
||||
|
||||
/** Field description */
|
||||
public static final String URLPART_AUTHENTICATION = "authentication/login";
|
||||
|
||||
@@ -53,7 +56,14 @@ public class ScmUrlProvider
|
||||
*/
|
||||
public ScmUrlProvider(String baseUrl)
|
||||
{
|
||||
this.baseUrl = baseUrl;
|
||||
if (!baseUrl.endsWith(API_PATH))
|
||||
{
|
||||
this.baseUrl = baseUrl.concat(API_PATH);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.baseUrl = baseUrl;
|
||||
}
|
||||
}
|
||||
|
||||
//~--- get methods ----------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user