roles is json

This commit is contained in:
Quaternions 2025-04-04 14:44:06 -07:00
parent b62b2fcf7b
commit 6c2d759ca5
Signed by: Quaternions
GPG Key ID: D0DF5964F79AC131

@ -72,11 +72,11 @@ export default function ReviewButtons(props: ReviewId) {
async function fetchData() {
try {
const [rolesData, userData] = await Promise.all([
fetch("/api/session/roles").then(rolesResponse => rolesResponse.text()).then(text => parseInt(text, 10)),
fetch("/api/session/roles").then(rolesResponse => rolesResponse.json()),
fetch("/api/session/user").then(userResponse => userResponse.json())
]);
setRoles(rolesData);
setRoles(rolesData.Roles);
setUser(userData.UserID);
} catch (error) {
console.error("Error fetching data:", error);