mirror of
https://github.com/documenso/documenso.git
synced 2025-11-14 00:32:43 +10:00
19 lines
558 B
TypeScript
19 lines
558 B
TypeScript
import { findPasskeys } from '@documenso/lib/server-only/auth/find-passkeys';
|
|
|
|
import { authenticatedProcedure } from '../trpc';
|
|
import { ZFindPasskeysRequestSchema, ZFindPasskeysResponseSchema } from './find-passkeys.types';
|
|
|
|
export const findPasskeysRoute = authenticatedProcedure
|
|
.input(ZFindPasskeysRequestSchema)
|
|
.output(ZFindPasskeysResponseSchema)
|
|
.query(async ({ input, ctx }) => {
|
|
const { page, perPage, orderBy } = input;
|
|
|
|
return await findPasskeys({
|
|
page,
|
|
perPage,
|
|
orderBy,
|
|
userId: ctx.user.id,
|
|
});
|
|
});
|