feat: init

This commit is contained in:
ccbikai
2024-05-25 08:09:30 +08:00
commit bd47e755d5
298 changed files with 21915 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
import type { H3Event } from 'h3'
export function useWAE(event: H3Event, query: string) {
const { cfAccountId, cfApiToken } = useRuntimeConfig(event)
console.log('useWAE', query)
return $fetch(`https://api.cloudflare.com/client/v4/accounts/${cfAccountId}/analytics_engine/sql`, {
method: 'POST',
headers: {
Authorization: `Bearer ${cfApiToken}`,
},
body: query,
retry: 1,
retryDelay: 100, // ms
})
}