Skip to content

Commit

Permalink
fix:remove record invalid record remove notice
Browse files Browse the repository at this point in the history
  • Loading branch information
vilenarios committed Aug 8, 2024
1 parent 2fad19d commit 4533807
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scripts/anp-control-01.lua
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,14 @@ Handlers.add(ANPControlSpecActionMap.RemoveRecord,
function(msg)
local assertHasPermission, permissionErr = pcall(assertHasPermission, msg.From)
if assertHasPermission == false then
return ao.send({ Target = msg.From, Action = "Invalid-Remove-Record-Notice", Data = permissionErr })
ao.send({
Target = msg.From,
Action = "Invalid-Remove-Record-Notice",
Data = permissionErr,
Error = "Remove-Record-Error",
["Message-Id"] = msg.Id,
})
return
end
local removeRecordStatus, removeRecordResult = pcall(records.removeRecord, msg.Tags["Sub-Domain"])
if not removeRecordStatus then
Expand Down

0 comments on commit 4533807

Please sign in to comment.