mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 00:03:33 +10:00
17 lines
654 B
TypeScript
17 lines
654 B
TypeScript
import { createPasskeyRegistrationOptions } from '@documenso/lib/server-only/auth/create-passkey-registration-options';
|
|
|
|
import { authenticatedProcedure } from '../trpc';
|
|
import {
|
|
ZCreatePasskeyRegistrationOptionsRequestSchema,
|
|
ZCreatePasskeyRegistrationOptionsResponseSchema,
|
|
} from './create-passkey-registration-options.types';
|
|
|
|
export const createPasskeyRegistrationOptionsRoute = authenticatedProcedure
|
|
.input(ZCreatePasskeyRegistrationOptionsRequestSchema)
|
|
.output(ZCreatePasskeyRegistrationOptionsResponseSchema)
|
|
.mutation(async ({ ctx }) => {
|
|
return await createPasskeyRegistrationOptions({
|
|
userId: ctx.user.id,
|
|
});
|
|
});
|