token-validator: fix handling of TTL in Maatma
This commit is contained in:
parent
3a9623a6af
commit
9f909b9cba
1 changed files with 5 additions and 3 deletions
|
@ -319,7 +319,7 @@ angular.module("AdLinApp")
|
|||
$scope.updateNS = function(domain, rr) {
|
||||
$scope.nsrr = {
|
||||
"domain": domain,
|
||||
"ttl": 900,
|
||||
"ttl": rr.ttl,
|
||||
"rr": "NS",
|
||||
"valuesfrom": rr.values.join(" "),
|
||||
"values": rr.values,
|
||||
|
@ -338,7 +338,7 @@ angular.module("AdLinApp")
|
|||
$scope.updateGLUE = function(domain, rr) {
|
||||
$scope.nsrr = {
|
||||
"domain": domain,
|
||||
"ttl": 900,
|
||||
"ttl": rr.ttl,
|
||||
"rr": "AAAA",
|
||||
"valuesfrom": rr.values.join(" "),
|
||||
"values": rr.values,
|
||||
|
@ -358,7 +358,7 @@ angular.module("AdLinApp")
|
|||
$scope.updateDS = function(domain, rr) {
|
||||
$scope.nsrr = {
|
||||
"domain": domain,
|
||||
"ttl": 900,
|
||||
"ttl": rr.ttl,
|
||||
"rr": "DS",
|
||||
"labels": ["Key Tag", "Algo clef", "Algo hash", "Hash (hex)"],
|
||||
"valuesfrom": rr.values.join(" "),
|
||||
|
@ -368,6 +368,8 @@ angular.module("AdLinApp")
|
|||
}
|
||||
|
||||
$scope.saveNSRR = function(nsrr) {
|
||||
if (nsrr.ttl)
|
||||
nsrr.ttl = parseInt(nsrr.ttl)
|
||||
$http({
|
||||
method: (nsrr.valuesfrom !== undefined)?'PATCH':'POST',
|
||||
url: "api/ddomains/" + nsrr.domain + "/" + nsrr.rr,
|
||||
|
|
Reference in a new issue