feat(hardlink): unify kiosk payments and finalize legacy cleanup

This commit is contained in:
2026-11-04 17:43:10 +00:00
parent 568adc034b
commit 814d87768d
57 changed files with 3624 additions and 1762 deletions
+12 -2
View File
@@ -71,7 +71,11 @@ func (app *App) testIssueDoorCard(w http.ResponseWriter, r *http.Request) {
}
// build lock server command
app.lockserver.BuildCommand(doorReq, checkIn, checkOut)
if err := app.lockserver.BuildCommand(doorReq, checkIn, checkOut); err != nil {
logging.Error(types.ServiceName, err.Error(), "Build key command", string(op), "", "", 0)
errorhandlers.WriteError(w, http.StatusBadGateway, "Build key command failed: "+err.Error())
return
}
// lock server sequence
if err := app.lockserver.LockSequence(); err != nil {
@@ -90,8 +94,14 @@ func (app *App) fetchChipDNAStatus(w http.ResponseWriter, r *http.Request) {
const op = logging.Op("fetchChipDNAStatus")
var theResponse cmstypes.StatusRec
if r.Method != http.MethodGet {
w.Header().Set("Allow", http.MethodGet)
errorhandlers.WriteError(w, http.StatusMethodNotAllowed, "Method not allowed; use GET")
return
}
w.Header().Set("Access-Control-Allow-Origin", "*")
w.Header().Set("Access-Control-Allow-Methods", "POST, OPTIONS")
w.Header().Set("Access-Control-Allow-Methods", "GET")
w.Header().Set("Access-Control-Allow-Headers", "Content-Type")
w.Header().Set("Content-Type", "application/json")
status, err := creditcall.ReadPdqStatus(app.cfg.Hotel, app.cfg.Kiosk)