10 lines
260 B
TypeScript
10 lines
260 B
TypeScript
import { getCookie } from 'h3'
|
|
|
|
export function getPiBaseUrl(event: any): string {
|
|
const cookieUrl = getCookie(event, 'quibot-pi-url')
|
|
if (cookieUrl) return decodeURIComponent(cookieUrl)
|
|
|
|
const config = useRuntimeConfig()
|
|
return config.quibotBaseUrl
|
|
}
|