Add return type to getRedactedCurrentLocation

This commit is contained in:
James Salter 2021-07-28 14:22:57 +01:00
parent 9420b81eeb
commit 60bc283455

View file

@ -88,7 +88,12 @@ const whitelistedScreens = new Set([
"start_sso", "start_cas", "groups", "complete_security", "post_registration", "room", "user", "group", "start_sso", "start_cas", "groups", "complete_security", "post_registration", "room", "user", "group",
]); ]);
export async function getRedactedCurrentLocation(origin: string, hash: string, pathname: string, anonymity: Anonymity) { export async function getRedactedCurrentLocation(
origin: string,
hash: string,
pathname: string,
anonymity: Anonymity,
): Promise<string> {
// Redact PII from the current location. // Redact PII from the current location.
// If anonymous is true, redact entirely, if false, substitute it with a hash. // If anonymous is true, redact entirely, if false, substitute it with a hash.
// For known screens, assumes a URL structure of /<screen name>/might/be/pii // For known screens, assumes a URL structure of /<screen name>/might/be/pii