Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 0627b06

Browse files
committed
fix: updated according to the modification on the api
1 parent a8952ab commit 0627b06

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

src/cli/commands/name/pubsub/subs.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module.exports = {
1212
if (err) {
1313
throw err
1414
} else {
15-
result.strings.forEach((s) => {
15+
result.forEach((s) => {
1616
print(s)
1717
})
1818
}

src/core/ipns/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class IPNS {
5656
// Resolve
5757
resolve (name, options, callback) {
5858
// If recursive, we should not try to get the cached value
59-
if (!options.nocache && !options.recursive) {
59+
if (options.nocache && !options.recursive) {
6060
// Try to get the record from cache
6161
const id = name.split('/')[2]
6262
const result = this.cache.get(id)

src/core/ipns/routing/pubsub.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,7 @@ class Pubsub {
143143
}
144144
})
145145

146-
callback(null, {
147-
strings
148-
})
146+
callback(null, strings)
149147
})
150148
}
151149

test/core/interface.spec.js

+8
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,14 @@ describe('interface-ipfs-core tests', () => {
7272
}
7373
}))
7474

75+
/*
76+
tests.namePubsub(CommonFactory.create({
77+
spawnOptions: {
78+
args: ['--enable-namesys-pubsub'],
79+
initOptions: { bits: 1024 }
80+
}
81+
})) */
82+
7583
tests.object(defaultCommonFactory)
7684

7785
tests.pin(defaultCommonFactory)

0 commit comments

Comments
 (0)