chore: utm (#2180)

This commit is contained in:
zxhlyh 2024-01-24 20:14:21 +08:00 • committed by GitHub
commit 0940084fd2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 41 additions and 8 deletions

View file

@ -20,6 +20,7 @@ import type {
ProviderAzureToken,
SetupStatusResponse,
UserProfileOriginResponse,
Utm,
} from '@/models/common'
import type {
UpdateOpenAIKeyResponse,
@ -262,3 +263,7 @@ type RetrievalMethodsRes = {
export const fetchSupportRetrievalMethods: Fetcher<RetrievalMethodsRes, string> = (url) => {
return get<RetrievalMethodsRes>(url)
}
export const operationUtm: Fetcher<CommonResponse, { url: string; body: Utm }> = ({ url, body }) => {
return post(url, { body }) as Promise<CommonResponse>
}