SHA256
Доработать UX и отмену pairing по коду
This commit is contained in:
@@ -199,6 +199,22 @@ public final class EspPairingRequestsDAO {
|
||||
});
|
||||
}
|
||||
|
||||
public void markCanceled(String pairingId, String rejectReason, long updatedAtMs) throws SQLException {
|
||||
updateSimple(pairingId, """
|
||||
UPDATE esp_pairing_requests
|
||||
SET status = 'canceled',
|
||||
reject_reason = ?,
|
||||
approved_by_session_id = NULL,
|
||||
encrypted_payload = NULL,
|
||||
updated_at_ms = ?
|
||||
WHERE pairing_id = ?
|
||||
""", ps -> {
|
||||
ps.setString(1, rejectReason);
|
||||
ps.setLong(2, updatedAtMs);
|
||||
ps.setString(3, pairingId);
|
||||
});
|
||||
}
|
||||
|
||||
public int expirePending(long nowMs) throws SQLException {
|
||||
try (Connection c = db.getConnection();
|
||||
PreparedStatement ps = c.prepareStatement("""
|
||||
|
||||
Reference in New Issue
Block a user