packages/udaru-core/lib/ops/teamOps.js
function deleteTeamPolicy (params, cb) {
      let promise = null
      if (typeof cb !== 'function') [promise, cb] = asyncify()

      const { teamId, organizationId, policyId, instance } = params

      Joi.validate({ teamId, organizationId, policyId, instance }, validationRules.deleteTeamPolicy, function (err) {
        if (err) return cb(Boom.badRequest(err))

        removeTeamPolicy({ client: db, teamId, policyId, instance }, (err, res) => {
          if (err) return cb(err)
          teamOps.readTeam({ id: teamId, organizationId }, cb)
        })
      })

      return promise
    }
function deleteTeamPolicy (params, cb) {
      let promise = null
      if (typeof cb !== 'function') [promise, cb] = asyncify()

      const { teamId, organizationId, policyId, instance } = params

      Joi.validate({ teamId, organizationId, policyId, instance }, validationRules.deleteTeamPolicy, function (err) {
        if (err) return cb(Boom.badRequest(err))

        removeTeamPolicy({ client: db, teamId, policyId, instance }, (err, res) => {
          if (err) return cb(err)
          teamOps.readTeam({ id: teamId, organizationId }, cb)
        })
      })

      return promise
    }
function deleteTeamPolicy ( params , cb ) { let promise = null if ( typeof cb !== 'function' ) [ promise , cb ] = asyncify ( ) const { teamId , organizationId , policyId , instance } = params Joi . validate ( { teamId , organizationId , policyId , instance } , validationRules . deleteTeamPolicy , function ( err ) { if ( err ) return cb ( Boom . badRequest ( err ) ) removeTeamPolicy ( { client : db , teamId , policyId , instance } , ( err , res ) => { if ( err ) return cb ( err ) teamOps . readTeam ( { id : teamId , organizationId } , cb ) } ) } ) return promise }
Remove a specific team policy

@param  {Object}   params { userId, organizationId, policyId, instance } "instance" optional
@param  {Function} cb
Remove a specific team policy