Here is my code with hidden API key. I’m not getting any errors but also not getting anything in exports. LanguageList is not getting returned. Any help would be appreciated!
import axios from “axios”
const API_KEY = ‘<***>’
const API_URL = ‘https://api.fliki.ai/v1’
async function languageList() {
try {
const { data } = await axios({
method: ‘get’,
url: ${API_URL}/languages
,
headers: {
Authentication: Bearer ${API_KEY}
,
‘Content-Type’: ‘application/json’,
},
})
return data ? data.data : null
} catch (error) {
console.log(error)
}
return null
}
export default defineComponent({
async run({ steps, $ }) {
return languageList()
}
})