Skip to content

Commit a075170

Browse files
Shreyash-work-emSrijan-SS02jaanbaaz
authored
Feature/dmp 2025 (#66) (#67)
* 1. Added year param in fetching issues * Removed submodule * Readded submodule --------- Co-authored-by: Srijan Srivastava <codeofficialsrijansriv@gmail.com> Co-authored-by: jaanbaaz <106968030+jaanbaaz@users.noreply.github.com>
1 parent 5bec82b commit a075170

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

app.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,13 @@ async def get_issues():
9090
type: string
9191
"""
9292
try:
93+
# Get year from query parameters
94+
year = request.args.get('year')
95+
year = int(year) if year and year.isdigit() else None
96+
9397
# Fetch all issues with their details
94-
print('inside get all issues')
95-
data = await DmpAPIQueries.get_issue_query(async_session)
98+
print(f'inside get all issues for year: {year}' if year else 'inside get all issues (all years)')
99+
data = await DmpAPIQueries.get_issue_query(async_session, year=year)
96100
response = []
97101

98102
for result in data:

0 commit comments

Comments
 (0)