fix manual station deactivate staying active under reservations
Stop auto-activating reservation slots immediately after a manual station release. This ensures the 'Station deaktivieren' action actually leaves the station deactivated, while reservation ownership remains intact until the user deletes the reservation.
This commit is contained in:
@@ -2875,12 +2875,7 @@ async function handleStationRelease(res, user) {
|
||||
};
|
||||
await writeJson(files.station, runtime.station);
|
||||
await appendAudit("station.deactivate", user, null);
|
||||
const autoActivated = await autoActivateReservationSlotIfNeededUnlocked({
|
||||
excludeUserId: user && user.id ? String(user.id) : ""
|
||||
});
|
||||
if (!autoActivated) {
|
||||
broadcastEvent("station.status.changed", buildStationStatusView());
|
||||
}
|
||||
return sendJson(res, 200, { ok: true, status: buildStationStatusView() });
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user