Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
rocksnow1942 committed Jan 13, 2022
1 parent 1984e58 commit 130323b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
1 change: 1 addition & 0 deletions ScannerApp/__version__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version = "1.0.0"
8 changes: 4 additions & 4 deletions ScannerApp/scanApp.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from .utils import AMS_Database,Firebase
import sys
from pathlib import Path
from .__version__ import version

class ScannerApp(tk.Tk,Logger):
def __init__(self):
Expand Down Expand Up @@ -78,7 +79,7 @@ def FirebaseConfig(self):
# the credential is a json string.
key = self.config['firebaseConfig']['firebaseKey']
token = self.config['firebaseConfig']['firebaseToken']
res = json.loads(decode(key,token))
res = json.loads(decode(key,token))
res.update(url=self.config['firebaseConfig']['firebaseURL'])
return res
@property
Expand Down Expand Up @@ -127,9 +128,8 @@ def validateInDatabase(self,code,codeType,validationType=None):

def loadConfig(self):
"load configuration from .ini"
# load version from package.json
with open('../package.json','rt') as f:
self.__version__ = json.load(f).get('version')
# load version from package.json
self.__version__ = version
folder = Path(__file__).parent.parent
config = configparser.ConfigParser()
config.optionxform = str # to perserve cases in option names.
Expand Down
File renamed without changes.
2 changes: 0 additions & 2 deletions app.sh

This file was deleted.

6 changes: 3 additions & 3 deletions defaultConfig.ini
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ LOGLEVEL = 'debug'

[firebaseConfig]
; producttion URL
firebaseURL = ""
firebaseURL = "https://us-central1-ams-clia.cloudfunctions.net/api"
; firebaseURL = 'http://localhost:5000/ams-clia/us-central1/api'
firebaseToken = ''
firebaseKey = ''
firebaseToken = 'w557wrnDlMOaw5bDiMOFwrPDksKYbsKYw6DDnMOGwqzDpcOWwp3Co8ObwoHClcKmwqjClMOKwqTDlsKFwoVmw5HDlsOXw43Dm8K1w5_DmlbCsMKQw6fDhMK6w6jDmcKjwqbDkWPCsQ=='
firebaseKey = 'cYDaudZdFmv4vnwcGub44mA495fg5i'

0 comments on commit 130323b

Please sign in to comment.