mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Added an API endpoint to check if a domain is a DynDNS one
This commit is contained in:
parent
06db6f7e04
commit
0b5c96e249
2 changed files with 18 additions and 0 deletions
|
@ -586,6 +586,16 @@ domain:
|
||||||
path:
|
path:
|
||||||
help: The path to check (e.g. /coffee)
|
help: The path to check (e.g. /coffee)
|
||||||
|
|
||||||
|
### domain_isdyndns()
|
||||||
|
isdyndns:
|
||||||
|
action_help: Check if a domain is a dyndns one
|
||||||
|
api: GET /domain/<domain>/isdyndns
|
||||||
|
arguments:
|
||||||
|
domain:
|
||||||
|
help: The domain to test (e.g. your.domain.tld)
|
||||||
|
extra:
|
||||||
|
pattern: *pattern_domain
|
||||||
|
|
||||||
subcategories:
|
subcategories:
|
||||||
dyndns:
|
dyndns:
|
||||||
subcategory_help: Subscribe and Update DynDNS Hosts
|
subcategory_help: Subscribe and Update DynDNS Hosts
|
||||||
|
|
|
@ -458,6 +458,14 @@ def domain_url_available(domain, path):
|
||||||
|
|
||||||
return len(_get_conflicting_apps(domain, path)) == 0
|
return len(_get_conflicting_apps(domain, path)) == 0
|
||||||
|
|
||||||
|
def domain_isdyndns(domain):
|
||||||
|
"""
|
||||||
|
Returns if a domain is a DynDNS one ( used via the web API )
|
||||||
|
|
||||||
|
Arguments:
|
||||||
|
domain -- the domain to check
|
||||||
|
"""
|
||||||
|
return is_yunohost_dyndns_domain(domain)
|
||||||
|
|
||||||
def _get_maindomain():
|
def _get_maindomain():
|
||||||
with open("/etc/yunohost/current_host", "r") as f:
|
with open("/etc/yunohost/current_host", "r") as f:
|
||||||
|
|
Loading…
Add table
Reference in a new issue