import { action } from '@wasp/actions'
export const analyzeData = action({
run: async ({ data }) => {
const response = await fetch('http://localhost:8000/analyze', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(data),
})
return await response.json()
}
})
import { action } from '@wasp/actions'
export const analyzeData = action({
run: async ({ data }) => {
const response = await fetch('http://localhost:8000/analyze', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(data),
})
return await response.json()
}
})