feat: telegram platform

This commit is contained in:
Acbox
2026-01-11 19:15:18 +08:00
parent f783457160
commit a7e07d7467
18 changed files with 2324 additions and 2 deletions
Binary file not shown.
+7 -2
View File
@@ -4,7 +4,12 @@ import { treaty } from '@elysiajs/eden'
export type ApiClient = typeof app
export const createClient = (
baseUrl: string = process.env.API_BASE_URL ?? 'http://localhost:7002'
baseUrl: string = process.env.API_BASE_URL ?? 'http://localhost:7002',
token?: string,
) => {
return treaty<ApiClient>(baseUrl)
return treaty<ApiClient>(baseUrl, {
headers: token ? {
'Authorization': `Bearer ${token}`,
} : undefined,
})
}