repo.or.cz
/
gitter.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge branch 'hotfix/21.56.9' into master
[gitter.git]
/
server
/
serializers
/
rest
/
uri-lookup-strategy.js
blob
c89e662b0f58f970b87ecedd0cfe069fca7c55d2
1
'use strict'
;
2
3
class
UriLookupStrategy
{
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
uri
:
item
.
uri
,
14
userId
:
item
.
userId
,
15
troupeId
:
item
.
troupeId
,
16
groupId
:
item
.
groupId
17
};
18
}
19
}
20
21
module
.
exports
=
UriLookupStrategy
;