-
-
Notifications
You must be signed in to change notification settings - Fork 7
Conversation
# Block access if no user was found in session | ||
return response | ||
|
||
response = {'data':{'message': 'Query did not run'}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initialize response at beginning
# number of days | ||
oldestDay = (datetime.datetime.fromtimestamp((_difference / 1000))).day | ||
|
||
response = {'data':{'oldestDay': oldestDay, 'message': 'Query ran'}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add code number to response. Possibly as a separate field.
|
||
# Define the AGENTS global variable | ||
USERS = Blueprint('USERS', __name__) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two spaces.
# Define the AGENTS global variable | ||
AGENTS = Blueprint('AGENTS', __name__) | ||
|
||
@AGENTS.route('/api/agent', methods=['GET']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two spaces
|
||
# Define the AGENTS global variable | ||
DATAPOINTS = Blueprint('DATAPOINTS', __name__) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two spaces
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Documentation needs to be improved greatly.
- It would be good for your Flask API results to return a status code along with the message. Or no message at all. For example a blank dict if nothing found, or a 404 if invalid.
- There are number of cases where variables should be initialized earlier.
Generally much better than the previous PR. Congrats.
|
||
# Define the PANEL global variable | ||
PANEL = Blueprint('PANEL', __name__) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two spaces
setup/_pattoo/db.py
Outdated
password, | ||
role)) | ||
print( | ||
'\n\nUsername: {}\nPassword: {}\nRole: {} ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use triple quoting and you won't need to insert the \n
values.
'''\
Username: {}
Password: {}
Role: {}
'''.format(username, password, role)
The unit tests and documentation are on their way.
So far:
Pending: