Skip to content

Commit 193261f

Browse files
author
Andrés Soto
committed
refactor: TT-356 Solving code smells from Sonarcloud
1 parent 9711ceb commit 193261f

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

V2/azure_time_tracker/activities/__init__.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@ def main(req: func.HttpRequest) -> func.HttpResponse:
99
logging.info(
1010
'Python HTTP trigger function processed a request to get an activity.'
1111
)
12-
mimetype = "application/json"
13-
id = req.route_params.get('id')
12+
activity_id = req.route_params.get('id')
1413

15-
if id:
16-
response = json.dumps(get_by_id(id))
14+
if activity_id:
15+
response = json.dumps(get_by_id(activity_id))
1716
else:
1817
response = json.dumps(get_all())
1918

20-
return func.HttpResponse(body=response, status_code=200, mimetype=mimetype)
19+
return func.HttpResponse(
20+
body=response, status_code=200, mimetype="application/json"
21+
)

V2/azure_time_tracker/activities/sample.dat

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)