Update logging

This commit is contained in:
Darren Clarke 2025-01-22 17:50:38 +01:00
parent def602c05e
commit 810a333429
39 changed files with 85 additions and 139 deletions

View file

@ -22,20 +22,17 @@ export const authOptions: NextAuthOptions = {
Credentials({
name: "Link",
credentials: {
authToken: { label: "AuthToken", type: "text", },
authToken: { label: "AuthToken", type: "text" },
},
async authorize(credentials, req) {
const { headers } = req;
console.log({ headers });
const leafcutterUser = headers?.["x-leafcutter-user"];
const authToken = credentials?.authToken;
if (!leafcutterUser || leafcutterUser.trim() === "") {
console.log("no leafcutter user");
return null;
}
console.log({ authToken });
return null;
/*
try {
@ -48,14 +45,13 @@ export const authOptions: NextAuthOptions = {
return user;
} catch (e) {
console.log({ e });
console.error({ e });
}
return null;
*/
}
})
},
}),
],
secret: process.env.NEXTAUTH_SECRET,
/*
@ -77,4 +73,3 @@ export const authOptions: NextAuthOptions = {
}
},*/
};

View file

@ -302,8 +302,7 @@ export const updateUserVisualization = async (
body,
});
} catch (e) {
// eslint-disable-next-line no-console
console.log({ e });
console.error({ e });
}
return id;