services -> domains
This commit is contained in:
@@ -16,13 +16,14 @@ func (api *API) DDNSStatus(w http.ResponseWriter, r *http.Request) {
|
||||
respondJSON(w, http.StatusOK, api.ddns.GetStatus())
|
||||
}
|
||||
|
||||
// DDNSTrigger forces an immediate DDNS IP check and update
|
||||
// DDNSTrigger forces an immediate DDNS check. The runner reads fresh params
|
||||
// (token, records) via its callback, so updated tokens take effect immediately.
|
||||
func (api *API) DDNSTrigger(w http.ResponseWriter, r *http.Request) {
|
||||
if api.ddns == nil {
|
||||
respondError(w, http.StatusServiceUnavailable, "DDNS not configured")
|
||||
return
|
||||
}
|
||||
api.ddns.Trigger()
|
||||
api.reloadDDNSIfEnabled()
|
||||
respondJSON(w, http.StatusOK, map[string]string{
|
||||
"message": "DDNS update triggered",
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user