Skip to content

Commit 2517d67

Browse files
committed
add tip to api
1 parent bcd0ffc commit 2517d67

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

taskapp.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ def decorated(*args, **kwargs):
155155
def api_login():
156156
auth = request.authorization
157157
if not auth or not auth.username or not auth.password:
158+
print("Test")
158159
return make_response({'message': 'Could not verify'}, 401, {'WWW.Authentication': 'Basic realm: "login required"'})
159160
coll = db['users']
160161
user = coll.find_one({'username': auth.username}, {'_id': 0})
@@ -173,7 +174,7 @@ def api_login():
173174
def api_current_task(user):
174175
current_task = get_taskCurrent(user.username)
175176
if current_task:
176-
return jsonify({'message': {'taskName': current_task[0], 'taskImage': current_task[6]}})
177+
return jsonify({'message': {'taskName': current_task[0], 'taskImage': current_task[6], 'taskTip': current_task[4]}})
177178
return jsonify({'message': None})
178179

179180
@app.route('/api/v1/resource/task_progress')

0 commit comments

Comments
 (0)