Skip to content

Commit

Permalink
letterCase
Browse files Browse the repository at this point in the history
  • Loading branch information
akastercomcom committed Jan 30, 2024
1 parent ba53f43 commit 2aaa4db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/middlewares/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ export default class Middleware {
//check if request is from blockchain trigger
const { triggerPath, triggerValue, txHash } = extractTriggerDataFromRequest(req);
if(!triggerPath || !triggerValue || !txHash) {
res.send("not from blockChain");
res.send("Not from blockChain");
return;
}
const result = await this.ain.getValue(triggerPath);
// if request is first reque st, set cache
if (this.cache.get(txHash) && this.cache.get(txHash) !== "error") {
res.send("duplicated");
res.send("Duplicated");
return;
}
this.cache.set(txHash, "in_progress", 500);
_.isEqual(result, triggerValue) ? next(): res.send("not from blockChain");
_.isEqual(result, triggerValue) ? next(): res.send("Not from blockChain");
}
/**
* DEPRECATED
Expand Down

0 comments on commit 2aaa4db

Please sign in to comment.