Skip to content

Commit

Permalink
fix: actually implement cast binding
Browse files Browse the repository at this point in the history
  • Loading branch information
depatchedmode committed Feb 2, 2024
1 parent e5ebeed commit 29a80e6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default async (req, context) => {
let from = 'poster';
let buttonId = null;
const payload = await parseRequest(req);
let isOriginal = false;
let isOriginal = true;
if (payload) {
const requestURL = new URL(req.url);
from = requestURL.searchParams.get('frame');
Expand All @@ -31,8 +31,10 @@ export default async (req, context) => {
}
}

const isOriginalCast = (hash) => {
return false
const isOriginalCast = (currHash) => {
const ogHash = process.env.BOUND_CAST_HASH;
console.log(ogHash,currHash);
return ogHash ? currHash == ogHash : true;
}

const respondWithRedirect = (redirectUrl) => {
Expand Down

0 comments on commit 29a80e6

Please sign in to comment.