remove duplicate list item

This commit is contained in:
Alan Hamlett
2024-10-08 22:53:09 +02:00
parent 54e797f601
commit 66b570bc75

View File

@@ -15,14 +15,7 @@ export const getApiUrl = async () => {
apiUrl: config.apiUrl,
});
let apiUrl = (settings.apiUrl as string) || config.apiUrl;
const suffixes = [
'/',
'.bulk',
'.bulk',
'/users/current/heartbeats',
'/heartbeats',
'/heartbeat',
];
const suffixes = ['/', '.bulk', '/users/current/heartbeats', '/heartbeats', '/heartbeat'];
for (const suffix of suffixes) {
if (apiUrl.endsWith(suffix)) {
apiUrl = apiUrl.slice(0, -suffix.length);