1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-03 09:03:32 +00:00

added Send sync notification support (#250)

This commit is contained in:
Addison Beck
2021-01-22 16:52:08 -05:00
committed by GitHub
parent 6ac6df75d7
commit 68bd93e45b
5 changed files with 64 additions and 0 deletions

View File

@@ -32,6 +32,10 @@ export class NotificationResponse extends BaseResponse {
case NotificationType.LogOut:
this.payload = new UserNotification(payload);
break;
case NotificationType.SyncSendCreate:
case NotificationType.SyncSendUpdate:
case NotificationType.SyncSendDelete:
this.payload = new SyncSendNotification(payload);
default:
break;
}
@@ -78,3 +82,16 @@ export class UserNotification extends BaseResponse {
this.date = new Date(this.getResponseProperty('Date'));
}
}
export class SyncSendNotification extends BaseResponse {
id: string;
userId: string;
revisionDate: Date;
constructor(response: any) {
super(response);
this.id = this.getResponseProperty('Id');
this.userId = this.getResponseProperty('UserId');
this.revisionDate = new Date(this.getResponseProperty('RevisionDate'));
}
}