зеркало из https://github.com/mozilla/fxa.git
Merge pull request #2055 from chenba/2047-support-panel-devices
fix(support panel): populate devices list correctly
This commit is contained in:
Коммит
c5d740e9ed
|
@ -61,6 +61,17 @@ export interface TotpTokenResponse {
|
|||
enabled: boolean;
|
||||
}
|
||||
|
||||
interface PanelTemplateContext {
|
||||
created: string;
|
||||
devices: Array<{ name: string; type: string; created: string }>;
|
||||
email: string;
|
||||
emailVerified: boolean;
|
||||
locale: string;
|
||||
subscriptionStatus: boolean;
|
||||
twoFactorAuth: boolean;
|
||||
uid: string;
|
||||
}
|
||||
|
||||
class SupportController {
|
||||
constructor(
|
||||
private readonly logger: Logger,
|
||||
|
@ -116,9 +127,9 @@ class SupportController {
|
|||
}
|
||||
}
|
||||
const hasSubscriptions = subscriptions.length > 0 ? true : false;
|
||||
const context = {
|
||||
const context: PanelTemplateContext = {
|
||||
created: String(new Date(account.createdAt)),
|
||||
devices: devices.forEach(d => {
|
||||
devices: devices.map(d => {
|
||||
return { name: d.name, type: d.type, created: String(new Date(d.createdAt)) };
|
||||
}),
|
||||
email: account.email,
|
||||
|
|
Загрузка…
Ссылка в новой задаче