fix: resolve zValidator type issues with optional schemas

Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>
This commit is contained in:
Devin AI 2025-07-18 04:42:48 +00:00
parent 6ef457d336
commit bb80240c24
3 changed files with 1 additions and 3 deletions

View File

@ -19,7 +19,7 @@ import { updateIntegrationHandler } from './update-integration';
const app = new Hono()
// Public endpoints (no auth required for OAuth flow)
.post('/auth/init', requireAuth, zValidator('json', InitiateOAuthSchema), initiateOAuthHandler)
.post('/auth/init', requireAuth, zValidator('json', z.object({}).merge(InitiateOAuthSchema.unwrap())), initiateOAuthHandler)
.get('/auth/callback', handleOAuthCallbackHandler)
// Protected endpoints
.get('/integration', requireAuth, getIntegrationHandler)

View File

@ -1,6 +1,5 @@
import { getUserOrganizationId } from '@buster/database';
import {
type InitiateOAuthRequest,
type InitiateOAuthResponse,
InitiateOAuthResponseSchema,
SlackError,

View File

@ -1,7 +1,6 @@
import { getUserOrganizationId } from '@buster/database';
import {
SlackError,
type UpdateIntegrationRequest,
type UpdateIntegrationResponse,
UpdateIntegrationResponseSchema,
} from '@buster/server-shared/slack';