-
Notifications
You must be signed in to change notification settings - Fork 0
TT-352 create v2 read activites flask endpoint #324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
JosueOb
merged 26 commits into
master
from
TT-352-Create-V2-read-activites-flask-endpoint
Oct 13, 2021
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
1065bde
feat: TT-353 Create V2 Activities DAO
3bb39b0
refactor: TT-353 Solving code smells from SonarCloud
b15c301
refactor: TT-353 Solving duplicated literal
7a2565c
refactor: TT-353 Add type of argument and return type to functions
8bdbdfe
refactor: TT-353 Solving comments from PR
bc998fe
refactor: TT-353 Solving Sonarcloud code smell
9d0e21e
refactor: TT-353 Changing variable names and tests
4c467c7
feat: TT-352 Create entry point and use case to get activities
JosueOb 408c016
feat: TT-352 Create entry point and use case to get activity
JosueOb a936f0a
refactor: TT-352 use list comprehensions
JosueOb 47bb34b
refactor: TT-352 standarization flask_api directory
JosueOb 1f92569
refactor: TT-353 Solving requested changes on PR
2ce4987
refactor: TT-352 use_cases and entry_points improvements to read acti…
JosueOb 361a864
Merge branch 'TT-353-Create-V2-Activities-DAO' into TT-352-Create-V2-…
JosueOb bb87c54
test: TT-352 Unit test of activity use cases
JosueOb 1006410
test: TT-352 entry_points and use_cases for activities complete testing
JosueOb 39f5221
refactor: TT-352 solving merge conflicts
JosueOb 9539885
code-smell: TT-352 fixing code-smell
JosueOb 9e090bc
build: TT-352 implementation of CSRF Protection using Flask-WTF
JosueOb b0cc467
refactor: TT-352 improving use_cases, endpoitns and test to get activ…
JosueOb 13133d1
test: TT-352 improved testing of activity use cases
JosueOb 7b582b7
refactor: TT-352 improvement of endpoint testing for obtaining activi…
JosueOb a2d912c
refactor: TT-352 refactoring of the use case and endpoint to obtain a…
JosueOb b4987e6
refactor: TT-352 refactoring of use cases and enpoint to obtain activ…
JosueOb 4866913
test: TT-352 refactoring of use cases and enpoint to obtain activities
JosueOb fd84ea1
refactor: TT-352 refactoring of activity endpoints
JosueOb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
refactor: TT-352 use_cases and entry_points improvements to read acti…
…vities
- Loading branch information
commit 2ce498751e92ed28e7aa496a0c65c68d5ad2ded8
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,15 @@ | ||
| from flask import Flask | ||
| from V2.source.entry_points.flask_api.api import init_app | ||
| from flask_restplus import Resource, Api | ||
| from . import activities_endpoints | ||
|
|
||
| app = Flask(__name__) | ||
| init_app(app) | ||
| api = Api( | ||
| app, | ||
| version='1.0', | ||
| title='Time Tracker API', | ||
| description='API for the TimeTracker project', | ||
| ) | ||
|
|
||
| ns_activities = api.namespace('activities', description='Endpoint for activities') | ||
| ns_activities.route('/')(activities_endpoints.Activities) | ||
| ns_activities.route('/<string:activity_id>')(activities_endpoints.Activity) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| from flask_restplus import Resource | ||
|
|
||
| from V2.source import use_cases | ||
|
|
||
| class Activities(Resource): | ||
| def get(self): | ||
| activities_dto = use_cases.get_list_activities() | ||
| activities = [activity_dto.__dict__ for activity_dto in activities_dto] | ||
| return activities | ||
|
|
||
|
|
||
| class Activity(Resource): | ||
| def get(self, activity_id: str): | ||
| activity_dto = use_cases.get_activity_by_id(activity_id) | ||
| activity = activity_dto.__dict__ | ||
| return activity | ||
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| from ._get_activities_use_case import get_list_activities | ||
| from ._get_activity_by_id_use_case import get_activity_by_id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
porqué el sufijo _dto?