Create new records
This commit is contained in:
parent
7d7c0c9570
commit
3763367510
6 changed files with 117 additions and 19 deletions
|
|
@ -101,13 +101,15 @@ func actionRecordSave(w http.ResponseWriter, r *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
err = device.UpdateDNSEntry(record.toDNSEntry())
|
||||
entry, err := device.UpdateDNSEntry(record.toDNSEntry())
|
||||
if err != nil {
|
||||
httpError(w, err)
|
||||
logger.Error("webserver", "op", "record_save", "error", err)
|
||||
return
|
||||
}
|
||||
|
||||
j, _ := json.Marshal(struct{ OK bool }{true})
|
||||
record = NewDNSRecord(entry)
|
||||
|
||||
j, _ := json.Marshal(struct{ OK bool; Record DNSRecord }{true, record})
|
||||
w.Write(j)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue