Handle push_to_storage in apiReturn
This commit is contained in:
parent
208da9b819
commit
422fa2469b
@ -675,6 +675,22 @@ export default class Services {
|
||||
}
|
||||
}
|
||||
|
||||
if (apiReturn.push_to_storage && apiReturn.push_to_storage.length != 0) {
|
||||
for (const hash of apiReturn.push_to_storage) {
|
||||
try {
|
||||
const value = await this.getBlobFromDb(hash);
|
||||
console.log(value);
|
||||
if (value) {
|
||||
await this.saveDataToStorage(hash, value, null);
|
||||
} else {
|
||||
console.error('Failed to get data from db');
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (apiReturn.commit_to_send) {
|
||||
const commit = apiReturn.commit_to_send;
|
||||
await this.sendCommitMessage(JSON.stringify(commit));
|
||||
|
Loading…
x
Reference in New Issue
Block a user