New features (#110)

* added upload status

* added changes for progress bar with more logs and bug fixes, Documentation yet to be added

* huge changes that need more doucmenting

* added possibility to get profile using NodeID

* added fix profile listing user profile information

* removed profile image from the explore reult struct

* saving current changes

* added filter to search based on NodeID

* Monday bug fixing

* updates to the profile

* changes for tracing the blockchain profile image not shown

* added condition to ensure TAG is not sent and removed debug prints

* updated webapi docs
This commit is contained in:
Akilan Selvacoumar
2023-06-28 00:38:17 +01:00
committed by GitHub
parent 97c3001596
commit ae5f1d2fd7
91 changed files with 483 additions and 196 deletions

View File

@@ -69,7 +69,11 @@ func (api *WebapiInstance) ExploreFileSharedByNodeThatSharedSimilarFile(fileType
// loop over results
for n := range resultFiles {
result.Files = append(result.Files, blockRecordFileToAPI(resultFiles[n]))
ApiFile := blockRecordFileToAPI(resultFiles[n])
if ApiFile.NodeID == nil {
continue
}
result.Files = append(result.Files, ApiFile)
}
}
@@ -86,8 +90,6 @@ func (api *WebapiInstance) GreedySearchMergeDirection(nodeID *[][]byte, fileType
// get all NodeIDs
peerList := api.Backend.PeerlistGet()
//var tags []blockchain.BlockRecordFileTag
// search with AllNodes which have a match of the NodeID.
for _, peer := range peerList {
if peer.BlockchainHeight == 0 {
@@ -112,28 +114,18 @@ func (api *WebapiInstance) GreedySearchMergeDirection(nodeID *[][]byte, fileType
file.Tags = append(file.Tags, blockchain.TagFromText(blockchain.TagSharedByGeoIP, sharedByGeoIP))
}
// found a new file! append.
filesFromPeer++
//file.Username = Name
// if both the hashes match
if bytes.Equal(file.Hash, hash) {
// set the Tags needed for the filter parameter
//tags = file.Tags
// found a new file! append.
filesFromPeer++
*nodeID = append(*nodeID, file.NodeID)
}
//for _, tag := range file.Tags {
// // checks if any of tags from
// // the NodeID provided matches
// // Requires better search parameters
// // So that it's more narrow
// for i := range tags {
// if tag.Text() == tags[i].Text() {
// *nodeID = append(*nodeID, file.NodeID)
// break
// }
// }
//}
}
}