Mirror of https://github.com/roostorg/osprey
github.com/roostorg/osprey
1import { UdfCategory } from '../types/DocTypes';
2import HTTPUtils, { HTTPResponse } from '../utils/HTTPUtils';
3
4export async function getUdfDocs(): Promise<UdfCategory[]> {
5 const response: HTTPResponse = await HTTPUtils.get('docs/udfs');
6
7 if (!response.ok) {
8 return [];
9 }
10
11 return response.data.udf_categories;
12}