src/components/orbit/browse/index.js
// Adds an entry to the black list
Adds an entry to the black list
Adds an entry to the black list
async addToBlackList (entry) {
    try {
      console.log('entry', entry)
      _this.setState({ inFetch: true })
      const { jwt } = getLocalUser()
      const options = {
        url: `${SERVER}/blacklist`,
        method: 'POST',
        headers: {
          Accept: 'application/json',
          Authorization: `Bearer ${jwt}`
        },
        data: {
          hash: entry._id,
          reason: 'Unspecified'
        }
      }
      const res = await axios(options)
      _this.setState({
        inFetch: false,
        blackListFetchStatus: {
          success: true,
          msg: res.data.message
        }
      })
    } catch (e) {
      _this.setState({
        inFetch: false,
        blackListFetchStatus: {
          success: false,
          msg: e.message
        }
      })
    }
  }
async addToBlackList ( entry ) { try { console . log ( 'entry' , entry ) _this . setState ( { inFetch : true } ) const { jwt } = getLocalUser ( ) const options = { url : ` ${ SERVER } ` , method : 'POST' , headers : { Accept : 'application/json' , Authorization : ` ${ jwt } ` } , data : { hash : entry . _id , reason : 'Unspecified' } } const res = await axios ( options ) _this . setState ( { inFetch : false , blackListFetchStatus : { success : true , msg : res . data . message } } ) } catch ( e ) { _this . setState ( { inFetch : false , blackListFetchStatus : { success : false , msg : e . message } } ) } }
Adds an entry to the black list
Adds an entry to the black list