-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: update tests for refactored stamp data
- Loading branch information
1 parent
1280ed3
commit 777abe4
Showing
7 changed files
with
351 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import axios from "axios"; | ||
import { StampsMetadataResponse } from "../hooks/useStampPages"; | ||
import { DEFAULT_IAM_URL } from "../hooks/usePassportScore"; | ||
|
||
export const fetchStampPages = async ({ | ||
apiKey, | ||
scorerId, | ||
overrideIamUrl, | ||
}: { | ||
apiKey: string; | ||
scorerId: string; | ||
overrideIamUrl?: string; | ||
}) => { | ||
// TODO: fix this to use propr url encoding | ||
const response = await axios.get<StampsMetadataResponse>( | ||
`${ | ||
overrideIamUrl || DEFAULT_IAM_URL | ||
}/embed/stamps/metadata?scorerId=${scorerId}`, | ||
{ | ||
headers: { | ||
"X-API-KEY": apiKey, | ||
"Content-Type": "application/json", | ||
}, | ||
} | ||
); | ||
|
||
return response.data; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.