3 const appEvents
= require('gitter-web-appevents');
4 const restSerializer
= require('../../serializers/rest-serializer');
7 create: function(/*model*/) {
11 update
: async
function(roomId
, securityDescriptorModel
) {
12 const url
= `/rooms/${roomId}/security`;
13 const strategy
= restSerializer
.SecurityDescriptorStrategy
.full();
14 const serializedSecurityDescriptor
= await restSerializer
.serializeObject(
15 securityDescriptorModel
,
18 appEvents
.dataChange2(url
, 'update', serializedSecurityDescriptor
, 'room.sd');
21 patch: function(roomId
, patch
) {
22 const url
= `/rooms/${roomId}/security`;
23 const patchMessage
= {
27 appEvents
.dataChange2(url
, 'patch', patchMessage
, 'room.sd');
30 remove: function(/*model*/) {
34 removeId: function(/*roomId*/) {