Get list of categories
import { categories } from '@batlify/mscms-api'
async function categoriesList() {
await categories.get()
.then((result) => {
// Returns list of categories and subcategories
console.log(result)
})
.catch((e) => {
// Getting categories list failed
console.log("Oops! Something went wrong :/", e)
})
}