revert fb8e77bb68
Local Build and Deploy / deploy (push) Successful in 1m11s
Local Build and Deploy / deploy (push) Successful in 1m11s
revert style: clean up code with prettier and eslint
This commit is contained in:
1 parent
27de078f54
commit
e85e4d74ea
378 files changed
+20710
-22428
No files matched your search
@@ -9,10 +9,7 @@ export interface AuthorizationEvent {
|
||||
error?: unknown;
|
||||
}
|
||||
|
||||
const clean = (value: string) =>
|
||||
value
|
||||
.replace(/(token|password|secret|cookie|authorization|select|insert|update|delete)[^\s]*/gi, "[REDACTED]")
|
||||
.slice(0, 160);
|
||||
const clean = (value: string) => value.replace(/(token|password|secret|cookie|authorization|select|insert|update|delete)[^\s]*/gi, "[REDACTED]").slice(0, 160);
|
||||
|
||||
export function authorizationActivity(event: AuthorizationEvent) {
|
||||
const description = [
|
||||
@@ -21,14 +18,6 @@ export function authorizationActivity(event: AuthorizationEvent) {
|
||||
event.permission ? `permission=${clean(event.permission)}` : null,
|
||||
`source=${clean(event.source)}`,
|
||||
`reason=${clean(event.reason)}`,
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join("; ");
|
||||
return {
|
||||
staffId: event.userId,
|
||||
action: event.kind,
|
||||
description,
|
||||
targetType: "user",
|
||||
targetId: event.userId,
|
||||
};
|
||||
].filter(Boolean).join("; ");
|
||||
return { staffId: event.userId, action: event.kind, description, targetType: "user", targetId: event.userId };
|
||||
}
|
||||
Reference in new issue
Block a user