
--- action.py
+++ action.py
... | ... | @@ -169,7 +169,8 @@ |
169 | 169 |
location_x = float(data['location_x']) |
170 | 170 |
location_y = float(data['location_y']) |
171 | 171 |
token = request.headers.get('Authorization') |
172 |
- print(token) |
|
172 |
+ #print(token) |
|
173 |
+ print(timestamp,location_x,location_y) |
|
173 | 174 |
#print(token) |
174 | 175 |
if not token: |
175 | 176 |
return jsonify({'result': 'fail', 'msg': '토큰이 없습니다.'}) |
... | ... | @@ -177,7 +178,7 @@ |
177 | 178 |
else: |
178 | 179 |
# Decode the token to verify it |
179 | 180 |
decoded_token = jwt.decode(token, "secret", algorithms=['HS256']) |
180 |
- print(decoded_token) |
|
181 |
+ #print(decoded_token) |
|
181 | 182 |
user_id = decoded_token['id'] |
182 | 183 |
|
183 | 184 |
# GPS 데이터베이스에 삽입 |
--- auth.py
+++ auth.py
... | ... | @@ -78,9 +78,9 @@ |
78 | 78 |
"message": "Register Failed" |
79 | 79 |
}, 500 |
80 | 80 |
else: |
81 |
- db.db_add_id(id,pw_has,user_email,sex,phone) |
|
81 |
+ db.db_add_id(id_,pw_has,user_email,sex,phone) |
|
82 | 82 |
return { |
83 |
- 'Authorization': id # str으로 반환하여 return |
|
83 |
+ 'Authorization': id_ # str으로 반환하여 return |
|
84 | 84 |
}, 200 |
85 | 85 |
|
86 | 86 |
@Auth.route('/login') |
--- example.json
+++ example.json
... | ... | @@ -1,16 +1,10 @@ |
1 | 1 |
{ |
2 | 2 |
"user_id":"testaccount", |
3 | 3 |
"trip_id":"cf07ca9f3219808ec7f3f8ff2111ed3d5c5aad33ad0c11f1e6027f378ed4e561", |
4 |
- "trip_log":[ |
|
4 |
+ "trip_log": |
|
5 | 5 |
{ |
6 |
- "latitude":37.778282, |
|
7 |
- "longitude":128.129373, |
|
8 |
- "timestamp":"2024-07-11 16:23:19.667" |
|
6 |
+ "latitude":[37.778282, 37.778282,], |
|
7 |
+ "longitude":[128.129373, 128.129373,], |
|
8 |
+ "timestamp":["2024-07-11 16:23:19.667","2024-07-11 16:09:43.175"], |
|
9 | 9 |
}, |
10 |
- { |
|
11 |
- "latitude":37.778282, |
|
12 |
- "longitude":128.129373, |
|
13 |
- "timestamp":"2024-07-11 15:02:18.965" |
|
14 |
- } |
|
15 |
- ] |
|
16 | 10 |
} |
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?