|
1 | | -import { type BuildAction } from 'remix/fetch-router' |
| 1 | +import { type Action } from 'remix/router' |
2 | 2 | import { readAuthenticatedAppUser } from '#server/authenticated-user.ts' |
3 | 3 | import { type routes } from '#server/routes.ts' |
4 | 4 | import { createChatThreadsStore } from '#server/chat-threads.ts' |
@@ -58,10 +58,7 @@ export function createChatThreadsHandler(appEnv: AppEnv) { |
58 | 58 | const thread = await store.createForUser(user.userId) |
59 | 59 | return jsonResponse({ ok: true, thread }, { status: 201 }) |
60 | 60 | }, |
61 | | - } satisfies BuildAction< |
62 | | - typeof routes.chatThreadsCreate.method | typeof routes.chatThreads.method, |
63 | | - typeof routes.chatThreads.pattern |
64 | | - > |
| 61 | + } satisfies Action<typeof routes.chatThreads> |
65 | 62 | } |
66 | 63 |
|
67 | 64 | export function createDeleteChatThreadHandler(appEnv: AppEnv) { |
@@ -111,10 +108,7 @@ export function createDeleteChatThreadHandler(appEnv: AppEnv) { |
111 | 108 |
|
112 | 109 | return jsonResponse({ ok: true }) |
113 | 110 | }, |
114 | | - } satisfies BuildAction< |
115 | | - typeof routes.chatThreadsDelete.method, |
116 | | - typeof routes.chatThreadsDelete.pattern |
117 | | - > |
| 111 | + } satisfies Action<typeof routes.chatThreadsDelete> |
118 | 112 | } |
119 | 113 |
|
120 | 114 | export function createUpdateChatThreadHandler(appEnv: AppEnv) { |
@@ -176,8 +170,5 @@ export function createUpdateChatThreadHandler(appEnv: AppEnv) { |
176 | 170 |
|
177 | 171 | return jsonResponse({ ok: true, thread }) |
178 | 172 | }, |
179 | | - } satisfies BuildAction< |
180 | | - typeof routes.chatThreadsUpdate.method, |
181 | | - typeof routes.chatThreadsUpdate.pattern |
182 | | - > |
| 173 | + } satisfies Action<typeof routes.chatThreadsUpdate> |
183 | 174 | } |
0 commit comments