1
0
Fork 0
mirror of https://codeberg.org/MarkusThielker/next-ory.git synced 2025-04-16 23:51:18 +00:00

NORY-22: fix typing problems

This commit is contained in:
Markus Thielker 2024-12-14 03:41:43 +01:00
parent 9faba3dc29
commit 63affda5fa
No known key found for this signature in database

View file

@ -11,21 +11,11 @@ export default async function UserDetailsPage({ params }: { params: Promise<{ id
const identityId = (await params).id; const identityId = (await params).id;
const identityApi = await getIdentityApi(); const identityApi = await getIdentityApi();
const identity = await identityApi.getIdentity({ const identity = await identityApi.getIdentity({ id: identityId })
id: identityId, .then((response) => {
includeCredential: [ console.log('identity', response.data);
'code', return response.data;
'code_recovery', })
'link_recovery',
'lookup_secret',
'oidc',
'passkey',
'password',
'totp',
'webauthn',
],
})
.then((response) => response.data)
.catch(() => { .catch(() => {
console.log('Identity not found'); console.log('Identity not found');
}); });
@ -85,11 +75,11 @@ export default async function UserDetailsPage({ params }: { params: Promise<{ id
</TableHeader> </TableHeader>
<TableBody> <TableBody>
{ {
Object.entries(identity.credentials).map(([key, value]) => { Object.entries(identity.credentials!).map(([key, value]) => {
return ( return (
<TableRow key={key}> <TableRow key={key}>
<TableCell>{key}</TableCell> <TableCell>{key}</TableCell>
<TableCell>{value.identifiers[0]}</TableCell> <TableCell>{value.identifiers![0]}</TableCell>
</TableRow> </TableRow>
); );
}) })