fix: DnsHole controls timer (#953)
* fix: DnsHole controls timer * fix: use plural naming * fix: reviewed changes * fix: change ControlsCard to jsx component * fix: DeepSource
This commit is contained in:
@@ -123,7 +123,7 @@ export class AdGuardHomeIntegration extends Integration implements DnsHoleSummar
|
||||
}
|
||||
}
|
||||
|
||||
public async disableAsync(duration?: number): Promise<void> {
|
||||
public async disableAsync(duration = 0): Promise<void> {
|
||||
const response = await fetch(`${this.integration.url}/control/protection`, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
@@ -132,7 +132,7 @@ export class AdGuardHomeIntegration extends Integration implements DnsHoleSummar
|
||||
},
|
||||
body: JSON.stringify({
|
||||
enabled: false,
|
||||
duration: duration,
|
||||
duration: duration * 1000,
|
||||
}),
|
||||
});
|
||||
if (!response.ok) {
|
||||
|
||||
Reference in New Issue
Block a user