Files
web2.0-frontend/src/api/tagApi.ts
T
Aarni Halinen 44ccdd87de arrow functions
2022-05-19 22:37:15 +03:00

17 lines
355 B
TypeScript

/* eslint-disable no-console */
import Tag from "@models/Tag";
import { APIPath, getBackendAPI } from "./backend";
class TagApi {
static getTags = async (): Promise<Tag[]> => {
try {
return await getBackendAPI<Tag[]>({ path: APIPath.TAGS });
} catch (err) {
console.error(err);
throw err;
}
};
}
export default TagApi;