quivr/frontend/lib/api/notification/notification.ts
Mamadou DICKO 7cc90ef258
feat: add polling for pending notifications (#1152)
* feat: add notification controller

* feat: add polling logic on pending notifications

* feat: refecth notifications on Feed
2023-09-12 18:00:46 +02:00

12 lines
317 B
TypeScript

import { AxiosInstance } from "axios";
import { Notification } from "@/app/chat/[chatId]/types";
export const getChatNotifications = async (
chatId: string,
axiosInstance: AxiosInstance
): Promise<Notification[]> => {
return (await axiosInstance.get<Notification[]>(`/notifications/${chatId}`))
.data;
};