Fix formatting
This commit is contained in:
@ -1,19 +1,21 @@
|
||||
import env from '#start/env'
|
||||
|
||||
export async function sendDataToWebhook(responseData:{ version: number, updatedAt: Date, numberOfRecords: number, data: unknown}) {
|
||||
try {
|
||||
console.log('syncing to webhook')
|
||||
await fetch(env.get('WEBHOOK_URL'),
|
||||
{
|
||||
headers:
|
||||
{
|
||||
'content-type': 'application/json'
|
||||
},
|
||||
method: 'POST',
|
||||
body: JSON.stringify(responseData)
|
||||
}
|
||||
)
|
||||
} catch (e) {
|
||||
console.error('error sending webhook data', e)
|
||||
}
|
||||
}
|
||||
export async function sendDataToWebhook(responseData: {
|
||||
version: number
|
||||
updatedAt: Date
|
||||
numberOfRecords: number
|
||||
data: unknown
|
||||
}) {
|
||||
try {
|
||||
console.log('syncing to webhook')
|
||||
await fetch(env.get('WEBHOOK_URL'), {
|
||||
headers: {
|
||||
'content-type': 'application/json',
|
||||
},
|
||||
method: 'POST',
|
||||
body: JSON.stringify(responseData),
|
||||
})
|
||||
} catch (e) {
|
||||
console.error('error sending webhook data', e)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user