``` const check = async (session:Session) => {...
# talk-keto
b
Copy code
const check = async (session:Session) => {
    const url = `<http://localhost:4466/relation-tuples/check>`;

    const body = {
      namespace: "vizual",
      object: "homepage",
      relation: "view",
      subject: session?.identity.traits.email,
    };
    const headers = new Headers({
      Authorization: `Bearer ${ORY_PAT}`,
      "Content-Type": "application/json"
    });

    const response = await fetch(url, {
      body: JSON.stringify(body),
      headers,
      method: "POST",
    });

    console.log(response.json());

  }