@@ 364-379 (lines=16) @@ | ||
361 | cursor.execute(query, (user_uuid, token,)) |
|
362 | row = cursor.fetchone() |
|
363 | ||
364 | if row is None: |
|
365 | if cursor: |
|
366 | cursor.close() |
|
367 | if cnx: |
|
368 | cnx.disconnect() |
|
369 | raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', |
|
370 | description='API.INVALID_SESSION_PLEASE_RE_LOGIN') |
|
371 | else: |
|
372 | utc_expires = row[0] |
|
373 | if datetime.utcnow() > utc_expires: |
|
374 | if cursor: |
|
375 | cursor.close() |
|
376 | if cnx: |
|
377 | cnx.disconnect() |
|
378 | raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', |
|
379 | description='API.USER_SESSION_TIMEOUT') |
|
380 | ||
381 | cursor.execute(" SELECT id " |
|
382 | " FROM tbl_users " |
|
@@ 283-298 (lines=16) @@ | ||
280 | cursor.execute(query, (user_uuid, token,)) |
|
281 | row = cursor.fetchone() |
|
282 | ||
283 | if row is None: |
|
284 | if cursor: |
|
285 | cursor.close() |
|
286 | if cnx: |
|
287 | cnx.disconnect() |
|
288 | raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', |
|
289 | description='API.INVALID_SESSION_PLEASE_RE_LOGIN') |
|
290 | else: |
|
291 | utc_expires = row[0] |
|
292 | if datetime.utcnow() > utc_expires: |
|
293 | if cursor: |
|
294 | cursor.close() |
|
295 | if cnx: |
|
296 | cnx.disconnect() |
|
297 | raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', |
|
298 | description='API.USER_SESSION_TIMEOUT') |
|
299 | ||
300 | cursor.execute(" SELECT id " |
|
301 | " FROM tbl_users " |
|
@@ 183-198 (lines=16) @@ | ||
180 | cursor.execute(query, (user_uuid, token,)) |
|
181 | row = cursor.fetchone() |
|
182 | ||
183 | if row is None: |
|
184 | if cursor: |
|
185 | cursor.close() |
|
186 | if cnx: |
|
187 | cnx.disconnect() |
|
188 | raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', |
|
189 | description='API.INVALID_SESSION_PLEASE_RE_LOGIN') |
|
190 | else: |
|
191 | utc_expires = row[0] |
|
192 | if datetime.utcnow() > utc_expires: |
|
193 | if cursor: |
|
194 | cursor.close() |
|
195 | if cnx: |
|
196 | cnx.disconnect() |
|
197 | raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', |
|
198 | description='API.USER_SESSION_TIMEOUT') |
|
199 | ||
200 | cursor.execute(" SELECT id " |
|
201 | " FROM tbl_users " |
|
@@ 76-91 (lines=16) @@ | ||
73 | cursor.execute(query, (user_uuid, token,)) |
|
74 | row = cursor.fetchone() |
|
75 | ||
76 | if row is None: |
|
77 | if cursor: |
|
78 | cursor.close() |
|
79 | if cnx: |
|
80 | cnx.disconnect() |
|
81 | raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', |
|
82 | description='API.INVALID_SESSION_PLEASE_RE_LOGIN') |
|
83 | else: |
|
84 | utc_expires = row[0] |
|
85 | if datetime.utcnow() > utc_expires: |
|
86 | if cursor: |
|
87 | cursor.close() |
|
88 | if cnx: |
|
89 | cnx.disconnect() |
|
90 | raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', |
|
91 | description='API.USER_SESSION_TIMEOUT') |
|
92 | ||
93 | cursor.execute(" SELECT id " |
|
94 | " FROM tbl_users " |
@@ 123-138 (lines=16) @@ | ||
120 | cursor.execute(query, (user_uuid, token,)) |
|
121 | row = cursor.fetchone() |
|
122 | ||
123 | if row is None: |
|
124 | if cursor: |
|
125 | cursor.close() |
|
126 | if cnx: |
|
127 | cnx.disconnect() |
|
128 | raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', |
|
129 | description='API.INVALID_SESSION_PLEASE_RE_LOGIN') |
|
130 | else: |
|
131 | utc_expires = row[0] |
|
132 | if datetime.utcnow() > utc_expires: |
|
133 | if cursor: |
|
134 | cursor.close() |
|
135 | if cnx: |
|
136 | cnx.disconnect() |
|
137 | raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', |
|
138 | description='API.USER_SESSION_TIMEOUT') |
|
139 | ||
140 | cursor.execute(" SELECT id " |
|
141 | " FROM tbl_users " |