Skip to content
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

PR for statistic endpoint #98

Merged
merged 7 commits into from
Oct 25, 2024
Merged

Conversation

Bosun-Josh121
Copy link
Contributor

No description provided.

@Bosun-Josh121 Bosun-Josh121 changed the title get_stats PR for statistic endpoint Oct 24, 2024
web_app/api/user.py Outdated Show resolved Hide resolved
web_app/api/user.py Outdated Show resolved Hide resolved
# Return total amounts and unique users count
return {"total_amounts": total_amounts, "unique_users": unique_users_count}

except Exception as e:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which particular exception your are trying to catch?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still opened issue

web_app/db/crud.py Outdated Show resolved Hide resolved
web_app/db/crud.py Outdated Show resolved Hide resolved
web_app/db/crud.py Outdated Show resolved Hide resolved
contract_address: str | None = Field(
None,
example="0xabc123...",
description="The contract address of the user, or None if not deployed.",
)


class GetStats(BaseModel):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Model name can start with verb
Change it to StatsData or StatsResponse if it's response model

# Return total amounts and unique users count
return {"total_amounts": total_amounts, "unique_users": unique_users_count}

except Exception as e:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still opened issue

web_app/db/crud.py Outdated Show resolved Hide resolved
web_app/db/crud.py Outdated Show resolved Hide resolved
Copy link
Owner

@djeck1432 djeck1432 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@djeck1432 djeck1432 merged commit 8f2af9c into djeck1432:main Oct 25, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants