mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 08:13:56 +10:00
fix: refactor auth router (#1983)
This commit is contained in:
@ -0,0 +1,16 @@
|
||||
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,
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user