cityssm/parking-ticket-system

View on GitHub
handlers/admin-post/doDeleteOffence.js

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import deleteParkingOffence from '../../database/parkingDB/deleteParkingOffence.js';
import getParkingOffences from '../../database/parkingDB/getParkingOffences.js';
export default function handler(request, response) {
    const results = deleteParkingOffence(request.body.bylawNumber, request.body.locationKey);
    if (results.success) {
        results.offences = getParkingOffences();
    }
    response.json(results);
}