]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
daf: fix HTTP DELETE
authorPetr Špaček <petr.spacek@nic.cz>
Tue, 31 Mar 2020 14:01:47 +0000 (16:01 +0200)
committerTomas Krizek <tomas.krizek@nic.cz>
Thu, 2 Apr 2020 11:57:32 +0000 (13:57 +0200)
Rule ID is a number, not a string.

modules/daf/daf.lua

index 94d0a49d06f8ea11b8b08673d5b403c0c8f5ab19..0a5a98df49c6a2bc27a0728b1f0af190f9fbd7bb 100644 (file)
@@ -251,7 +251,7 @@ local function api(h, stream)
                local path = h:get(':path')
                local id = tonumber(path:match '/([^/]*)$')
                if id then
-                       if consensus('daf.del "%s"', id) then
+                       if consensus('daf.del(%s)', id) then
                                return tojson(true)
                        end
                        return 404, '"No such rule"' -- Not found