
--- action.py
+++ action.py
... | ... | @@ -1,11 +1,9 @@ |
1 | 1 |
|
2 |
-from flask_restx import Resource, Api, Namespace, fields,reqparse |
|
2 |
+from flask_restx import Resource, Namespace, fields |
|
3 | 3 |
from flask import request,jsonify |
4 | 4 |
from flask import Flask, request |
5 | 5 |
import os |
6 |
-from haversine import haversine |
|
7 | 6 |
from database.database import DB |
8 |
-from datetime import datetime |
|
9 | 7 |
import pandas as pd |
10 | 8 |
import jwt |
11 | 9 |
|
... | ... | @@ -92,14 +90,6 @@ |
92 | 90 |
return jsonify({'result': 'fail', 'msg': '토큰이 만료되었습니다.'}), 401 |
93 | 91 |
except jwt.InvalidTokenError: |
94 | 92 |
return jsonify({'result': 'fail', 'msg': '유효하지 않은 토큰입니다.'}), 401 |
95 |
- |
|
96 |
- # Interact with the DB to get user history |
|
97 |
- try: |
|
98 |
- db = DB() |
|
99 |
- result, status_code = db.get_history(user_name=user_id) |
|
100 |
- return jsonify({'result': 'success', 'data': result}), status_code |
|
101 |
- except Exception as e: |
|
102 |
- return jsonify({'result': 'fail', 'msg': str(e)}), 500 |
|
103 | 93 |
|
104 | 94 |
db = DB() |
105 | 95 |
data = request.get_json() |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?