mirror of https://github.com/buster-so/buster.git
fix: resolve zValidator type issues with optional schemas
Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>
This commit is contained in:
parent
6ef457d336
commit
bb80240c24
|
@ -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)
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { getUserOrganizationId } from '@buster/database';
|
||||
import {
|
||||
type InitiateOAuthRequest,
|
||||
type InitiateOAuthResponse,
|
||||
InitiateOAuthResponseSchema,
|
||||
SlackError,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import { getUserOrganizationId } from '@buster/database';
|
||||
import {
|
||||
SlackError,
|
||||
type UpdateIntegrationRequest,
|
||||
type UpdateIntegrationResponse,
|
||||
UpdateIntegrationResponseSchema,
|
||||
} from '@buster/server-shared/slack';
|
||||
|
|
Loading…
Reference in New Issue