Merge branch 'main' of https://github.com/VAR-Virtual-Air-Rescue/var-monorepo
This commit is contained in:
@@ -29,6 +29,7 @@ export const useMissionsStore = create<MissionStore>((set) => ({
|
||||
missionPatientInfo: "TestPatientInfo",
|
||||
missionStationIds: [],
|
||||
createdUserId: "1",
|
||||
hpgMissionString: null,
|
||||
missionLog: [],
|
||||
missionStationUserIds: [],
|
||||
hpgLocationLat: 52.520008,
|
||||
@@ -49,7 +50,7 @@ export const useMissionsStore = create<MissionStore>((set) => ({
|
||||
},
|
||||
body: JSON.stringify(mission),
|
||||
});
|
||||
if (!res.ok) return undefined;
|
||||
if (!res.ok) return new Error("Failed to create mission");
|
||||
const data = await res.json();
|
||||
set((state) => ({ missions: [...state.missions, data] }));
|
||||
return data;
|
||||
|
||||
Reference in New Issue
Block a user