Esempio n. 1
0
 function (callback) {
     ResourceAssociation.create( data ).then(function (association) {
         callback(null, association);
     }).catch(function (err) {
         callback(err.message);
     });
 }
Esempio n. 2
0
 function (callback) {
     ResourceAssociation.count({where: {
         resourceId: resource.id,
         userId: user.id
     }}).then(function (count) {
         callback(null, count);
     });
 },
Esempio n. 3
0
 function countUserResourceAssociations(callback) {
     ResourceAssociation.count({where: {
         resourceId: data.resourceId,
         userId: data.userId
     }}).then(function (count) {
         callback(null, count);
     });
 },
Esempio n. 4
0
 function (callback) {
     ResourceAssociation.findById( associationId)
         .then(function (association) {
             callback( null, association);
         })
         .catch(function (err) {
             callback(err.message);
         });
 },
Esempio n. 5
0
 function (callback) {
     ResourceAssociation.find({
         where: {
             id: associationId
         },
         attributes: ['id','context','resourceId','userId','projectId','workflowId','workflowServiceSubstepId']
     }).then(function (association) {
         callback( null, association);
     }).catch(function (err) {
         callback(err.message);
     });
 },