Files
opensourcepos/app/Libraries
Travis Garrison 01166ae775 fix(login): distinguish DB unavailable from empty install
`getCurrentVersion()` previously returned `int` with 0 used for both
\"empty database\" and \"DB connection failure\". This conflated two
distinct states, causing login to skip auth when DB was unreachable.

Changes:
- Return type widened to `?int`: null = DB unavailable, 0 = confirmed
  empty DB (new install), positive int = migrated
- Login controller now returns 503 on null (DB error) before checking
  isNewInstall
- isNewInstall gate now uses `=== 0` instead of falsy check

Signed-off-by: Travis Garrison <travis@chiraqbookstore.com>
2026-07-30 15:15:33 +04:00
..
2024-06-15 17:19:15 +02:00
2025-03-28 21:24:21 +04:00