mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 07:10:57 +00:00
39 lines
912 B
TypeScript
39 lines
912 B
TypeScript
import { withHeaders } from "@/record-management/services/api/withHeaders";
|
|
import { AxiosResponse } from "axios";
|
|
import recordAxiosInstance from "./recordAxiosInstance";
|
|
|
|
interface params {
|
|
take: number;
|
|
skip: number;
|
|
orderBy?:string;
|
|
}
|
|
|
|
export const getAllNotification =async(
|
|
params: params
|
|
):Promise<AxiosResponse>=>{
|
|
return recordAxiosInstance.get("/notifications", {
|
|
params: params,
|
|
headers: withHeaders(),
|
|
});
|
|
|
|
}
|
|
|
|
export const getUnSeenNotification = async(
|
|
params: params
|
|
):Promise<AxiosResponse>=>{
|
|
return recordAxiosInstance.get("/notifications/unseen", {
|
|
params: params,
|
|
headers: withHeaders(),
|
|
});
|
|
}
|
|
|
|
export const readNotification = (
|
|
id:string
|
|
):Promise<AxiosResponse>=>{
|
|
return recordAxiosInstance.post(
|
|
`/notifications/${id}/read`,
|
|
{},
|
|
{ headers: withHeaders() }
|
|
);
|
|
}
|