mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-07 09:35:54 -08:00
Remove node-unifi package dependency
- Add custom Unifi proxy built on existing cookie jar and httpProxy - Change formatApiCall to emit empty string instead of undefined on missing key
This commit is contained in:
@@ -2,7 +2,7 @@ export function formatApiCall(url, args) {
|
||||
const find = /\{.*?\}/g;
|
||||
const replace = (match) => {
|
||||
const key = match.replace(/\{|\}/g, "");
|
||||
return args[key];
|
||||
return args[key] || "";
|
||||
};
|
||||
|
||||
return url.replace(/\/+$/, "").replace(find, replace);
|
||||
|
||||
Reference in New Issue
Block a user