Cross Reference:
xref
: /
forgerock
/
openidm-v4
/
openidm-zip
/
src
/
main
/
resources
/
samples
/
sample7
/
script
/
setScimPhotos.js
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
setScimPhotos.js revision 3b70a3e7bfc7ae8aa755080c981dfc939e8a259e
var
photosList
=
source
.
photos
;
var
photos
= [];
function
getType
(
photoUrl
) {
var
test
=
photoUrl
.
split
(
"/"
).
reverse
()[
0
];
switch
(
test
) {
case
"F"
:
return
"photo"
;
case
"T"
:
return
"thumbnail"
;
default
:
return
"no-type"
;
}
}
var
i =
0
;
for
(i =
0
; i <
photosList
.
length
; i +=
1
) {
photos
.
push
({
value
:
photosList
[i],
type
:
getType
(
photosList
[i])});
}
photos
;