mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-01-24 01:50:19 +08:00
set domains
This commit is contained in:
parent
e6c313729b
commit
b6807d1895
@ -10,7 +10,7 @@ COPY static ./static
|
||||
COPY requirements.txt main.py ./
|
||||
RUN apt update
|
||||
|
||||
# Install supervisord
|
||||
# Install supervisords
|
||||
RUN apt install -y supervisor
|
||||
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
COPY config/cmd.sh /cmd.sh
|
||||
|
@ -724,7 +724,7 @@ def app_domain_add(app_id, domain):
|
||||
|
||||
old_domains = get_all_domains(app_id)
|
||||
if domain in old_domains:
|
||||
raise CommandException(const.ERROR_CLIENT_PARAM_NOTEXIST, "Domain is binded", "")
|
||||
raise CommandException(const.ERROR_CLIENT_PARAM_NOTEXIST, "Domain is in use", "")
|
||||
|
||||
proxy = get_proxy(app_id)
|
||||
if proxy != None:
|
||||
@ -800,7 +800,9 @@ def app_domain_add(app_id, domain):
|
||||
}
|
||||
|
||||
response = requests.post(url, data=json.dumps(data), headers=headers)
|
||||
if response.json()["error"] != None:
|
||||
myLogger.info_logger(response.json())
|
||||
if response.json()["error"]:
|
||||
myLogger.info_logger(response.json())
|
||||
raise CommandException(const.ERROR_API_NGINX, response.json()["error"]["message"], "")
|
||||
set_domain(domain, app_id)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user