added suspending admin email to error screen

This commit is contained in:
Jori Lallo
2018-03-06 23:38:52 -08:00
parent e9e4538436
commit f5c1ddf8b9
7 changed files with 37 additions and 22 deletions

View File

@@ -19,11 +19,10 @@ export function AdminRequiredError(
return httpErrors(403, message, { id: 'admin_required' });
}
export function UserSuspendedError(
message: string = 'Your access has been suspended by the team admin'
) {
return httpErrors(403, message, {
export function UserSuspendedError({ adminEmail }: { adminEmail: string }) {
return httpErrors(403, 'Your access has been suspended by the team admin', {
id: 'user_suspended',
adminEmail,
});
}