fix: html/apiUrls cannot end with /
This commit is contained in:
parent
1657e5a151
commit
0b709c93a8
@ -12,8 +12,8 @@
|
||||
try {
|
||||
await post(`/sources/${id}.json`, {
|
||||
name: source.name,
|
||||
htmlUrl: source.htmlUrl,
|
||||
apiUrl: source.apiUrl
|
||||
htmlUrl: source.htmlUrl.replace(/\/$/, ''),
|
||||
apiUrl: source.apiUrl.replace(/\/$/, '')
|
||||
});
|
||||
toast.push('Settings saved.');
|
||||
} catch ({ error }) {
|
||||
@ -50,8 +50,8 @@
|
||||
await post(`/sources/${id}/github.json`, {
|
||||
type: 'github',
|
||||
name: source.name,
|
||||
htmlUrl: source.htmlUrl,
|
||||
apiUrl: source.apiUrl
|
||||
htmlUrl: source.htmlUrl.replace(/\/$/, ''),
|
||||
apiUrl: source.apiUrl.replace(/\/$/, '')
|
||||
});
|
||||
} catch ({ error }) {
|
||||
return errorNotification(error);
|
||||
|
@ -38,8 +38,8 @@
|
||||
await post(`/sources/${id}/gitlab.json`, {
|
||||
type: 'gitlab',
|
||||
name: source.name,
|
||||
htmlUrl: source.htmlUrl,
|
||||
apiUrl: source.apiUrl,
|
||||
htmlUrl: source.htmlUrl.replace(/\/$/, ''),
|
||||
apiUrl: source.apiUrl.replace(/\/$/, ''),
|
||||
oauthId: source.gitlabApp.oauthId,
|
||||
appId: source.gitlabApp.appId,
|
||||
appSecret: source.gitlabApp.appSecret,
|
||||
@ -56,8 +56,8 @@
|
||||
try {
|
||||
await post(`/sources/${id}.json`, {
|
||||
name: source.name,
|
||||
htmlUrl: source.htmlUrl,
|
||||
apiUrl: source.apiUrl
|
||||
htmlUrl: source.htmlUrl.replace(/\/$/, ''),
|
||||
apiUrl: source.apiUrl.replace(/\/$/, '')
|
||||
});
|
||||
} catch ({ error }) {
|
||||
return errorNotification(error);
|
||||
|
Loading…
Reference in New Issue
Block a user