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