Skip to content

Commit

Permalink
set return type to pinata functions
Browse files Browse the repository at this point in the history
  • Loading branch information
gravityblast committed Oct 27, 2023
1 parent 8ce70ba commit 8cf3e9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/dev/populate/projects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function loadFixture(name: string): Buffer {
return data;
}

async function uploadJSONToPinata(content: any) {
async function uploadJSONToPinata(content: any): Promise<string> {
const { IpfsHash } = await fetch(`${pinataBaseUrl}/pinning/pinJSONToIPFS`, {
method: "POST",
headers: {
Expand All @@ -31,7 +31,7 @@ async function uploadJSONToPinata(content: any) {
return IpfsHash;
}

async function uploadFileToPinata(b: Buffer) {
async function uploadFileToPinata(b: Buffer): Promise<string> {
const body = new FormData();
body.append("file", new Blob([b]));

Expand Down

0 comments on commit 8cf3e9d

Please sign in to comment.