added Callback and custon notification Toast, client notification event handler
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Mission, Prisma } from "@repo/db";
|
||||
import { Mission, MissionSdsLog, Prisma } from "@repo/db";
|
||||
import axios from "axios";
|
||||
import { serverApi } from "helpers/axios";
|
||||
|
||||
@@ -26,6 +26,29 @@ export const editMissionAPI = async (
|
||||
const respone = await serverApi.patch<Mission>(`/mission/${id}`, mission);
|
||||
return respone.data;
|
||||
};
|
||||
export const sendSdsMessageAPI = async (
|
||||
id: number,
|
||||
sdsMessage: MissionSdsLog,
|
||||
) => {
|
||||
const respone = await serverApi.post<Mission>(
|
||||
`/mission/${id}/send-sds`,
|
||||
sdsMessage,
|
||||
);
|
||||
return respone.data;
|
||||
};
|
||||
|
||||
export const startHpgValidation = async (
|
||||
id: number,
|
||||
config?: {
|
||||
alertWhenValid?: boolean;
|
||||
},
|
||||
) => {
|
||||
const respone = await serverApi.post<Mission>(
|
||||
`/mission/${id}/validate-hpg`,
|
||||
config,
|
||||
);
|
||||
return respone.data;
|
||||
};
|
||||
|
||||
export const sendMissionAPI = async (
|
||||
id: number,
|
||||
|
||||
Reference in New Issue
Block a user