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