AG-21184 - Added transforming protection_disabled_duration field value from 0 to null;

Updates#5689

Squashed commit of the following:

commit 4de24101622c8c76be8e2f1eb1b670c36a1e74c8
Merge: fd9ee1fb 0376afb3
Author: Artem Krisanov <a.krisanov@adguard.com>
Date:   Tue Apr 11 18:12:57 2023 +0300

    Merge branch 'master' of ssh://bit.adguard.com:7999/dns/adguard-home into 5689-protection-status

commit fd9ee1fba4e507875dd8b2b605d14cd78aa4e918
Author: Artem Krisanov <a.krisanov@adguard.com>
Date:   Tue Apr 11 14:10:44 2023 +0300

    Added transforming protection_disabled_duration field value from 0 to null;
This commit is contained in:
Artem Krisanov 2023-04-11 18:16:24 +03:00
parent 0376afb38e
commit c1924a8b8a

View File

@ -49,6 +49,9 @@ export const setTlsConfig = (config) => async (dispatch, getState) => {
const dnsStatus = await apiClient.getGlobalStatus();
if (dnsStatus) {
if (dnsStatus.protection_disabled_duration === 0) {
dnsStatus.protection_disabled_duration = null;
}
dispatch(dnsStatusSuccess(dnsStatus));
}