This commit is contained in:
David Nguyen
2025-05-07 15:03:20 +10:00
parent 419bc02171
commit 7abfc9e271
390 changed files with 21254 additions and 12607 deletions

View File

@ -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,
});
});