Skip to content

Commit

Permalink
min fix
Browse files Browse the repository at this point in the history
  • Loading branch information
turinglabsorg committed Jan 14, 2020
1 parent 48eab78 commit 2156482
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/libs/Daemon.ts
Expand Up @@ -213,7 +213,9 @@ module Daemon {
}
}
}
await db.collection("written").insertOne(datastore)
if(datastore.uuid !== undefined && datastore.uuid !== ''){
await db.collection("written").insertOne(datastore)
}
}else{
console.log('DATA ALREADY STORED.')
}
Expand Down
2 changes: 1 addition & 1 deletion src/routes/Pdm.ts
Expand Up @@ -291,7 +291,7 @@ async function parseDB(DB, filters = {}, history = false){
let uuids = []
for(let x in DB){
let written = DB[x]
if(written['data'] !== undefined){
if(written['data'] !== undefined && written['uuid'] !== undefined){
if(written['data'] !== 'END'){
if(ended.indexOf(written['uuid']) === -1){
if(JSON.stringify(written['data']).indexOf('ipfs:') !== -1){
Expand Down

0 comments on commit 2156482

Please sign in to comment.