|
@@ -24,14 +24,11 @@ export class P2pStorageIpfsProvider {
|
|
|
const options = {
|
|
|
params: { arg: hash }
|
|
|
};
|
|
|
+
|
|
|
return this.http.get(this.infuraUrl + "cat", options).toPromise();
|
|
|
}
|
|
|
|
|
|
public async fetchTweets(hashs: string[]) {
|
|
|
- const tweetPromises = [];
|
|
|
- hashs.forEach(hash => {
|
|
|
- tweetPromises.push(this.fetchTweet(hash));
|
|
|
- });
|
|
|
- return await Promise.all(tweetPromises);
|
|
|
+ return await Promise.all(hashs.map(hash => this.fetchTweet(hash)));
|
|
|
}
|
|
|
}
|