notification count

This commit is contained in:
hamid zarghami
2025-12-22 14:14:20 +03:30
parent 051c12725b
commit d363e64bcc
4 changed files with 30 additions and 2 deletions
+14 -1
View File
@@ -1,5 +1,9 @@
import { api } from "@/config/axios";
import { CategoriesResponse, FoodsResponse } from "../types/Types";
import {
CategoriesResponse,
FoodsResponse,
NotificationsCountResponse,
} from "../types/Types";
export const getFoods = async (slug: string): Promise<FoodsResponse> => {
const response = await api.get<FoodsResponse>(
@@ -16,3 +20,12 @@ export const getCategories = async (
);
return response.data;
};
export const getNotificationsCount = async (): Promise<
NotificationsCountResponse
> => {
const response = await api.get<NotificationsCountResponse>(
`/public/notifications/unseen-count`
);
return response.data;
};