mirror of
https://github.com/gethomepage/homepage.git
synced 2026-01-05 15:02:08 +08:00
Run pre-commit hooks over existing codebase
Co-Authored-By: Ben Phelps <ben@phelps.io>
This commit is contained in:
@@ -5,7 +5,7 @@ export function formatApiCall(url, args) {
|
||||
return args[key] || "";
|
||||
};
|
||||
|
||||
return url.replace(/\/+$/, "").replace(find, replace).replace(find,replace);
|
||||
return url.replace(/\/+$/, "").replace(find, replace).replace(find, replace);
|
||||
}
|
||||
|
||||
function getURLSearchParams(widget, endpoint) {
|
||||
@@ -57,8 +57,8 @@ export function jsonArrayFilter(data, filter) {
|
||||
export function sanitizeErrorURL(errorURL) {
|
||||
// Dont display sensitive params on frontend
|
||||
const url = new URL(errorURL);
|
||||
["apikey", "api_key", "token", "t"].forEach(key => {
|
||||
if (url.searchParams.has(key)) url.searchParams.set(key, "***")
|
||||
["apikey", "api_key", "token", "t"].forEach((key) => {
|
||||
if (url.searchParams.has(key)) url.searchParams.set(key, "***");
|
||||
});
|
||||
return url.toString();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user