chore: more clean up + ts issues

This commit is contained in:
Carl-Gerhard Lindesvärd
2025-02-11 21:50:51 +01:00
parent 3205ea0a31
commit cfd7fd9c5e
7 changed files with 12 additions and 233 deletions

View File

@@ -15,8 +15,6 @@ export const clientRouter = createTRPCRouter({
z.object({
id: z.string(),
name: z.string(),
cors: z.string().nullable(),
crossDomain: z.boolean().optional(),
}),
)
.mutation(async ({ input, ctx }) => {
@@ -35,8 +33,6 @@ export const clientRouter = createTRPCRouter({
},
data: {
name: input.name,
cors: input.cors ?? null,
crossDomain: input.crossDomain,
},
});
}),

View File

@@ -2,8 +2,8 @@ import crypto from 'node:crypto';
import type { z } from 'zod';
import { stripTrailingSlash } from '@openpanel/common';
import { db, getId, getOrganizationBySlug, getUserById } from '@openpanel/db';
import type { ProjectType } from '@openpanel/db';
import { db, getId, getOrganizationBySlug, getUserById } from '@openpanel/db';
import { zOnboardingProject } from '@openpanel/validation';
import { hashPassword } from '@openpanel/common/server';
@@ -114,7 +114,6 @@ export const onboardingRouter = createTRPCRouter({
organizationId: organization.id,
projectId: project.id,
type: 'write',
cors: input.domain ? stripTrailingSlash(input.domain) : null,
secret: await hashPassword(secret),
},
});