Gitter migration: Setup redirects (rollout pt. 3)
[gitter.git] / server / serializers / rest / troupes / room-invite-strategy.js
blob7f294f00ff18502d41ed00ba2a51f34e1420a7d6
1 'use strict';
3 class RoomInviteStrategy {
4   contstructor(options) {
5     this.userId = options.userId || options.currentUserId;
6   }
8   preload() {}
10   map(invite) {
11     return {
12       id: invite.id || invite._id,
13       troupeId: invite.troupeId,
14       type: invite.type,
15       emailAddress: invite.emailAddress,
16       externalId: invite.externalId,
17       userId: invite.userId,
18       invitedByUserId: invite.invitedByUserId,
19       state: invite.state,
20       reminderSent: invite.reminderSent
21     };
22   }
25 module.exports = RoomInviteStrategy;