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

      const { id, organizationId } = params

      Joi.validate({ id, organizationId }, validationRules.deleteTeamPolicies, function (err) {
        if (err) return cb(Boom.badRequest(err))

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

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

      const { id, organizationId } = params

      Joi.validate({ id, organizationId }, validationRules.deleteTeamPolicies, function (err) {
        if (err) return cb(Boom.badRequest(err))

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

      return promise
    }
function deleteTeamPolicies ( params , cb ) { let promise = null if ( typeof cb !== 'function' ) [ promise , cb ] = asyncify ( ) const { id , organizationId } = params Joi . validate ( { id , organizationId } , validationRules . deleteTeamPolicies , function ( err ) { if ( err ) return cb ( Boom . badRequest ( err ) ) clearTeamPolicies ( { teamId : id , client : db } , ( err , res ) => { if ( err ) return cb ( err ) teamOps . readTeam ( { id , organizationId } , cb ) } ) } ) return promise }
Remove all team's policies

@param  {Object}   params { id, organizationId }
@param  {Function} cb
Remove all team s policies