Files
memegoat/frontend/src/services/category.service.ts
Mathis HERRIOT 35abd0496e
Some checks failed
Deploy to Production / deploy (push) Failing after 2m20s
Lint / lint (push) Successful in 9m37s
refactor: apply consistent formatting to improve code quality
Ensure uniform code formatting across components by aligning with the established code style. Adjust imports, indentation, and spacing to enhance readability and maintainability.
2026-01-14 17:26:58 +01:00

15 lines
366 B
TypeScript

import api from "@/lib/api";
import type { Category } from "@/types/content";
export const CategoryService = {
async getAll(): Promise<Category[]> {
const { data } = await api.get<Category[]>("/categories");
return data;
},
async getOne(id: string): Promise<Category> {
const { data } = await api.get<Category>(`/categories/${id}`);
return data;
},
};