mirror of
https://github.com/documenso/documenso.git
synced 2025-11-20 03:32:14 +10:00
fix: wip
This commit is contained in:
@ -0,0 +1,22 @@
|
||||
import { createOrganisation } from '@documenso/lib/server-only/organisation/create-organisation';
|
||||
|
||||
import { authenticatedProcedure } from '../trpc';
|
||||
import {
|
||||
ZCreateOrganisationRequestSchema,
|
||||
ZCreateOrganisationResponseSchema,
|
||||
} from './create-organisation.types';
|
||||
|
||||
export const createOrganisationRoute = authenticatedProcedure
|
||||
// .meta(createOrganisationMeta)
|
||||
.input(ZCreateOrganisationRequestSchema)
|
||||
.output(ZCreateOrganisationResponseSchema)
|
||||
.mutation(async ({ input, ctx }) => {
|
||||
const { name, url } = input;
|
||||
const { user } = ctx;
|
||||
|
||||
await createOrganisation({
|
||||
userId: user.id,
|
||||
name,
|
||||
url,
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user