Skip to content

Commit

Permalink
feat(app, database-client): adjust ceramicContext to make requests to…
Browse files Browse the repository at this point in the history
… ceramicCacheClient
  • Loading branch information
tim-schultz committed Feb 3, 2023
1 parent 723ac5e commit 6ef25db
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/.env-example.env
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ID=my_gtm_id
NEXT_ETHERSCAN_API_KEY=ASAADASDA
NEXT_PUBLIC_FF_MULTI_EVM_SIGNER=on

NEXT_PUBLIC_CERAMIC_CACHE_ENDPOINT=http://localhost:8000/
NEXT_PUBLIC_CERAMIC_CACHE_ENDPOINT=http://localhost:8000/
9 changes: 5 additions & 4 deletions database-client/src/ceramicCacheClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class CeramicCacheDatabase implements DataStorageBase {
address: string;
logger: Logger;

constructor(ceramicCacheUrl: string, address: string, ceramicCacheApiKey: string, logger?: Logger) {
constructor(ceramicCacheUrl: string, ceramicCacheApiKey: string, address: string, logger?: Logger) {
this.ceramicCacheUrl = ceramicCacheUrl;
this.ceramicCacheApiKey = ceramicCacheApiKey;
this.address = address;
Expand All @@ -33,10 +33,10 @@ export class CeramicCacheDatabase implements DataStorageBase {

try {
const response = await axios.get(
`${this.ceramicCacheUrl}/ceramic-cache/stamp?${this.address}`,
`${this.ceramicCacheUrl}/ceramic-cache/stamp?address=${this.address}`,
{
headers: {
'X-API-Key': this.ceramicCacheApiKey,
"X-API-Key": this.ceramicCacheApiKey,
},
}
)
Expand Down Expand Up @@ -72,7 +72,8 @@ export class CeramicCacheDatabase implements DataStorageBase {
},
{
headers: {
'X-API-Key': this.ceramicCacheApiKey,
"X-API-Key": this.ceramicCacheApiKey,
accept: "application/json",
'Content-Type': 'application/json',
},
}
Expand Down

0 comments on commit 6ef25db

Please sign in to comment.