From 03486219a15d71a54a809827e6ee19e63702fe4a Mon Sep 17 00:00:00 2001 From: Evandro Pomatti Date: Sat, 28 May 2022 01:34:01 -0300 Subject: [PATCH] fixied W0621 and improts --- microservices/vote/src/app.py | 4 ++-- microservices/vote/src/repository.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/microservices/vote/src/app.py b/microservices/vote/src/app.py index bc31662..4802697 100644 --- a/microservices/vote/src/app.py +++ b/microservices/vote/src/app.py @@ -1,8 +1,8 @@ from flask import Flask, request from dotenv import load_dotenv -from src import microservices, repository from epomatti_aksmrc_core import validators +from src import microservices, repository from src.schemas import vote_schema @@ -21,7 +21,7 @@ def readiness(): @app.route(BASE_PATH, methods=['POST']) def post(): vote_json = request.get_json() - repository.vote(vote_json) + repository.add_vote(vote_json) microservices.increment_pool(vote_json['pool_id']) return "", 201 diff --git a/microservices/vote/src/repository.py b/microservices/vote/src/repository.py index 9c0676d..e61d6f4 100644 --- a/microservices/vote/src/repository.py +++ b/microservices/vote/src/repository.py @@ -1,6 +1,6 @@ from epomatti_aksmrc_core import mongo -def vote(vote): +def add_vote(vote): return _get_collection().insert_one(vote)