mirror of https://codeberg.org/pzp/pzp-db.git
rename feed.getRoot() to feed.getId()
This commit is contained in:
parent
0772aa4883
commit
90395b8bd3
|
@ -225,7 +225,7 @@ exports.init = function initDB(peer, config) {
|
|||
const keys = opts.keys ?? config.keys
|
||||
const { group, type } = opts
|
||||
|
||||
const feedRootHash = getFeedRoot(group, type)
|
||||
const feedRootHash = getFeedId(group, type)
|
||||
if (feedRootHash) return cb(null, feedRootHash)
|
||||
|
||||
const feedRoot = MsgV2.createRoot(group, type, keys)
|
||||
|
@ -354,7 +354,7 @@ exports.init = function initDB(peer, config) {
|
|||
})
|
||||
}
|
||||
|
||||
function getFeedRoot(groupId, findType) {
|
||||
function getFeedId(groupId, findType) {
|
||||
const findGroup = MsgV2.stripGroup(groupId)
|
||||
for (const rec of records()) {
|
||||
if (MsgV2.isFeedRoot(rec.msg, findGroup, findType)) return rec.hash
|
||||
|
@ -429,7 +429,7 @@ exports.init = function initDB(peer, config) {
|
|||
},
|
||||
feed: {
|
||||
publish: publishToFeed,
|
||||
getRoot: getFeedRoot,
|
||||
getId: getFeedId,
|
||||
},
|
||||
getRecord,
|
||||
get,
|
||||
|
|
Loading…
Reference in New Issue