CosmicJay2k / grupp-a-java

0 stars 1 forks source link

Parking event service stop #36

Closed FredricNordin closed 1 year ago

FredricNordin commented 1 year ago

Added column Price to ParkingEvent, added a route to stop an active parking event. When the event recieves a stop it will set isActive to false, sets endTime to now(), calculates the difference in minutes between startTime and endTime then calculate a price 0.17:-/m. Price will be 10:-/h -ish ..

This route is a PutMapping, only because it is in a conflict to the PatchMapping that extends the endTime only.. Maybe we should remove that route?

Also, do not merge this before #32 , or I don't know #32 is included here also but you decide!