From 29645b29448ffa1a1c1e42e04be46b347861fe34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yi=C4=9Fit=20=C3=87olako=C4=9Flu?= Date: Fri, 15 Mar 2019 11:36:02 +0300 Subject: [PATCH] fixed indent --- server_side/api/voting_system/app.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/server_side/api/voting_system/app.py b/server_side/api/voting_system/app.py index bd9002a..53c10e3 100644 --- a/server_side/api/voting_system/app.py +++ b/server_side/api/voting_system/app.py @@ -65,12 +65,11 @@ class Voting(Resource): abort(404, error="Voting {} doesn't exist".format(voting_id)) class Vote(Resource): - def get(self, voting_id, vote_id): - votings[voting_id - 1]['votes'][vote_id - 1]['votes'] += 1 - with open(os.path.join(app.root_path, 'votings.json'), 'w') as f: - json.dump(votings, f, indent=4) - - return votings[voting_id - 1] + def get(self, voting_id, vote_id): + votings[voting_id - 1]['votes'][vote_id - 1]['votes'] += 1 + with open(os.path.join(app.root_path, 'votings.json'), 'w') as f: + json.dump(votings, f, indent=4) + return votings[voting_id - 1] api.add_resource(Votings, '/votings', '/votings/') api.add_resource(Voting, '/votings/')