repo.or.cz
/
gitter.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Gitter migration: Setup redirects (rollout pt. 3)
[gitter.git]
/
server
/
serializers
/
rest
/
subscription-strategy.js
blob
ceeac72bdbbe1b054880e1ba4a818413452f1e06
1
'use strict';
2
3
class SubscriptionStrategy {
4
contstructor(options) {
5
this.userId = options.userId || options.currentUserId;
6
}
7
8
preload() {}
9
10
map(item) {
11
return {
12
id: item.id || item._id,
13
userId: item.userId,
14
uri: item.uri,
15
lcUri: item.lcUri,
16
plan: item.plan,
17
subscriptionType: item.subscriptionType,
18
status: item.status
19
};
20
}
21
}
22
23
module.exports = SubscriptionStrategy;