remove duplicate list item
This commit is contained in:
@@ -15,14 +15,7 @@ export const getApiUrl = async () => {
|
|||||||
apiUrl: config.apiUrl,
|
apiUrl: config.apiUrl,
|
||||||
});
|
});
|
||||||
let apiUrl = (settings.apiUrl as string) || config.apiUrl;
|
let apiUrl = (settings.apiUrl as string) || config.apiUrl;
|
||||||
const suffixes = [
|
const suffixes = ['/', '.bulk', '/users/current/heartbeats', '/heartbeats', '/heartbeat'];
|
||||||
'/',
|
|
||||||
'.bulk',
|
|
||||||
'.bulk',
|
|
||||||
'/users/current/heartbeats',
|
|
||||||
'/heartbeats',
|
|
||||||
'/heartbeat',
|
|
||||||
];
|
|
||||||
for (const suffix of suffixes) {
|
for (const suffix of suffixes) {
|
||||||
if (apiUrl.endsWith(suffix)) {
|
if (apiUrl.endsWith(suffix)) {
|
||||||
apiUrl = apiUrl.slice(0, -suffix.length);
|
apiUrl = apiUrl.slice(0, -suffix.length);
|
||||||
|
|||||||
Reference in New Issue
Block a user