chore: add options for alerts
This commit is contained in:
@@ -205,14 +205,14 @@ export const getMyLocation = async (): Promise<{
|
||||
// ALERTES
|
||||
// ============================================
|
||||
|
||||
export const triggerPoliceAlert = async (): Promise<{
|
||||
export const triggerPoliceAlert = async (alertMessage: string): Promise<{
|
||||
success: boolean;
|
||||
alert_id?: number;
|
||||
message?: string;
|
||||
error?: string;
|
||||
}> => {
|
||||
try {
|
||||
const { data } = await apiClient.post(`${API}/alert`);
|
||||
const { data } = await apiClient.post(`${API}/alert`, { message: alertMessage });
|
||||
return {
|
||||
success: true,
|
||||
alert_id: data.alert_id,
|
||||
|
||||
Reference in New Issue
Block a user