diff --git a/appmanage/Dockerfile b/appmanage/Dockerfile index 8b1d2295..7a4cb109 100644 --- a/appmanage/Dockerfile +++ b/appmanage/Dockerfile @@ -10,7 +10,7 @@ COPY static ./static COPY requirements.txt main.py database.sqlite ./ RUN apt update -# Install supervisords +# Install supervisord RUN apt install -y supervisor COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY config/cmd.sh /cmd.sh diff --git a/appmanage/api/service/db.py b/appmanage/api/service/db.py index 94c2cce6..abcc1eab 100644 --- a/appmanage/api/service/db.py +++ b/appmanage/api/service/db.py @@ -19,7 +19,9 @@ def AppUpdateUser(user_name, password): conn.close() def AppSearchUsers(user_type): - if user_type != "nginx" or user_type != "portainer": + if user_type == None or user_type == "undefine": + raise CommandException(const.ERROR_CLIENT_PARAM_BLANK, "This plugin is blank!", "This plugin is blank!") + if user_type != "nginx" and user_type != "portainer": raise CommandException(const.ERROR_CLIENT_PARAM_NOTEXIST, "This plugin doesn't exist!", "This plugin doesn't exist!") conn = sqlite3.connect('/usr/src/app/database.sqlite') conn.row_factory = dict_factory