Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

GC endpoint #992

Merged
merged 4 commits into from
Jul 10, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: better repo.gc() response handling
  • Loading branch information
dirkmc committed Jul 9, 2019
commit c755ddecbbda24c36887d8665b0bad5518ee3d33
5 changes: 3 additions & 2 deletions src/repo/gc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

const promisify = require('promisify-es6')
const streamToValueWithTransformer = require('../utils/stream-to-value-with-transformer')
const CID = require('cids')

const transform = function (res, callback) {
callback(null, res.map(r => ({
err: r.Err,
cid: (r.Key || {})['/']
err: r.Err ? new Error(r.Err) : null,
cid: r.Key ? new CID(r.Key) : null
})))
}

Expand Down