Merge branch 'hotfix/21.56.9' into master
[gitter.git] / server / serializers / rest / push-notification-device-strategy.js
blobf27b0922d67e8ebe2f05f461ef5e4ca597b9bc8b
1 'use strict';
3 class PushNotificationDeviceStrategy {
4 contstructor(options) {
5 this.userId = options.userId || options.currentUserId;
8 preload() {}
10 map(item) {
11 return {
12 id: item.id || item._id,
13 userId: item.userId,
14 deviceId: item.deviceId,
15 deviceName: item.deviceName,
16 deviceType: item.deviceType,
17 mobileNumber: item.mobileNumber,
18 enabled: item.enabled,
19 appVersion: item.appVersion,
20 appBuild: item.appBuild,
21 timestamp: item.timestamp
26 module.exports = PushNotificationDeviceStrategy;