diff --git a/myems-api/README.md b/myems-api/README.md index b199d330..9e8ae9e2 100644 --- a/myems-api/README.md +++ b/myems-api/README.md @@ -70,17 +70,15 @@ cp example.env .env docker build -t myems/myems-api . ``` * Run a Docker container -On Windows host, bind-mount a share upload folder at c:\upload to the container, +On Windows host, bind-mount a share upload folder at c:\myems-upload to the container, and also bind-mount the .env to the container. ```bash -mkdir c:\upload -docker run -d -p 8000:8000 -v c:\upload:/var/www/html/admin/upload -v c:\myems-api\.env:/code/.env --restart always --name myems-api myems/myems-api +docker run -d -p 8000:8000 -v c:\myems-upload:/var/www/html/admin/upload -v c:\myems-api\.env:/code/.env --restart always --name myems-api myems/myems-api ``` -On Linux host, bind-mount a share upload file folder at /upload to the container, +On Linux host, bind-mount a share upload file folder at /myems-upload to the container, and also bind-mount the .env to the container. ```bash -mkdir /upload -docker run -d -p 8000:8000 -v /upload:/var/www/html/admin/upload -v /myems-api/.env:/.env --restart always --name myems-api myems/myems-api +docker run -d -p 8000:8000 -v /myems-upload:/var/www/html/admin/upload -v /myems-api/.env:/.env --restart always --name myems-api myems/myems-api ``` * -d Run container in background and print container ID @@ -1678,6 +1676,7 @@ Result | contact | Object | Contact Object | | cost_center | Object | Cost Center Object | | description | string | Store description | +| qrcode | string | QRCode in String | * GET All Stores ```bash diff --git a/myems-api/core/store.py b/myems-api/core/store.py index fe614f28..c5b88483 100644 --- a/myems-api/core/store.py +++ b/myems-api/core/store.py @@ -83,7 +83,8 @@ class StoreCollection: "is_input_counted": bool(row['is_input_counted']), "contact": contact, "cost_center": cost_center, - "description": row['description']} + "description": row['description'], + "qrcode": 'store:' + row['uuid']} result.append(meta_result) cursor.close() @@ -329,7 +330,8 @@ class StoreItem: "is_input_counted": bool(row['is_input_counted']), "contact": contact, "cost_center": cost_center, - "description": row['description']} + "description": row['description'], + "qrcode": 'store:' + row['uuid']} resp.text = json.dumps(meta_result)