mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-15 17:43:03 +03:00
7cc90ef258
* feat: add notification controller * feat: add polling logic on pending notifications * feat: refecth notifications on Feed
12 lines
317 B
TypeScript
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;
|
|
};
|