Skip to content

Commit

Permalink
fix: web: client response type (#319)
Browse files Browse the repository at this point in the history
  • Loading branch information
crlssn authored Dec 22, 2024
1 parent 8214f98 commit d07f68b
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions web/src/http/clients.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createClient } from '@connectrpc/connect'
import { type Client, createClient } from '@connectrpc/connect'
import { auth, logger } from '@/http/interceptors'
import { FeedService } from '@/proto/api/v1/feed_service_pb'
import { AuthService } from '@/proto/api/v1/auth_service_pb'
Expand All @@ -18,10 +18,16 @@ const transport = createConnectTransport({
interceptors: [logger, auth],
})

export const authClient = createClient(AuthService, transport)
export const feedClient = createClient(FeedService, transport)
export const userClient = createClient(UserService, transport)
export const routineClient = createClient(RoutineService, transport)
export const workoutClient = createClient(WorkoutService, transport)
export const exerciseClient = createClient(ExerciseService, transport)
export const notificationClient = createClient(NotificationService, transport)
export const authClient: Client<typeof AuthService> = createClient(AuthService, transport)
export const feedClient: Client<typeof FeedService> = createClient(FeedService, transport)
export const userClient: Client<typeof UserService> = createClient(UserService, transport)
export const routineClient: Client<typeof RoutineService> = createClient(RoutineService, transport)
export const workoutClient: Client<typeof WorkoutService> = createClient(WorkoutService, transport)
export const exerciseClient: Client<typeof ExerciseService> = createClient(
ExerciseService,
transport,
)
export const notificationClient: Client<typeof NotificationService> = createClient(
NotificationService,
transport,
)

0 comments on commit d07f68b

Please sign in to comment.