bright-policeman-41717
10/12/2022, 4:48 PMconst 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());
}