24 lines
534 B
TypeScript
24 lines
534 B
TypeScript
import axios from 'axios'
|
|
|
|
//MonthlyReleasePosts
|
|
export async function MonthlyReleasePostsData() {
|
|
const response = await axios.get(
|
|
'https://cmswp.gwkbali.com/wp-json/wp/v2/monthly-release'
|
|
) //
|
|
return response.data
|
|
}
|
|
|
|
//
|
|
const whatsnewfetchdata = async (url) => {
|
|
try {
|
|
const response = await axios.get(url)
|
|
return response.data
|
|
console.log(response.data)
|
|
} catch (error) {
|
|
console.error('Error fetching data:', error)
|
|
throw new Error('Error fetching data')
|
|
}
|
|
}
|
|
|
|
export default whatsnewfetchdata
|