-
Notifications
You must be signed in to change notification settings - Fork 5
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
Scrimmaging record API refactor #888
Conversation
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.
Left some thoughts! Great work overall. I noticed that it ran a bit slowly on my local, so I on a whim threw it into Perplexity and had it transform the logic to run using Django ORM and it is super speedy now (funny, I love AI). Pls address review comments and then re request review. Again, great work on this 😎
wins = serializers.IntegerField() | ||
losses = serializers.IntegerField() | ||
ties = serializers.IntegerField() | ||
Ranked = ScrimmageRecordSerializerHelper() |
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.
yknow I think i made this name and it was kinda lazy of me... what if renamed to ScrimmageRecordVariantSerializer
or similar?
// scrimmageType={ | ||
// CompeteMatchScrimmagingRecordRetrieveScrimmageTypeEnum.All | ||
// } | ||
scrimmageType="All" |
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.
hmm i think it could be good to refactor these string constants to a typed constant! is there anywhere in autogen that provides such an enum? if not, make one and put it in /api/apiTypes.ts 😄
interface WinLossTieProps { | ||
scrimmageType: CompeteMatchScrimmagingRecordRetrieveScrimmageTypeEnum; | ||
scrimmageType: "All" | "Ranked" | "Unranked"; // Adjust to match the new schema |
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.
good comment for me the reviewer to understand but future onlookers would have no idea what schema it refers to haha. probably best to remove comment (and make this field refer to your new typed constant)
oh btw @beshrislambouli before committing run |
0748072
to
e818c69
Compare
rebased cleanup
e818c69
to
93e6035
Compare
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.
LGTM! will merge great work
solves #848