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:
@@ -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'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user