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

Feature/improve configuration #129

Merged
merged 2 commits into from
Aug 25, 2023
Merged

Conversation

BradLewis
Copy link
Member

Adding more configuration so we can more easily do things like update the max images and increase the size of the images we use.

Currently this is only for the backend. Not sure the best way to integrate this into the frontend

@BradLewis BradLewis requested a review from TheDen August 21, 2023 02:17
@@ -24,9 +25,9 @@ type CollageRequest struct {
Period string `in:"query=period;default=7day" validate:"required,validatePeriod"`
Height uint `in:"query=height;default=0" validate:"gte=0,lte=3000"`
Width uint `in:"query=width;default=0" validate:"gte=0,lte=3000"`
Rows int `in:"query=rows;default=3" validate:"required,gte=1,lte=20"`
Rows int `in:"query=rows;default=3" validate:"required"`
Copy link
Member

@TheDen TheDen Aug 21, 2023

Choose a reason for hiding this comment

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

I noticed you removed lte and gte—is the idea to set the max by the amount of images and not grid size?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I removed this validation as we do another validation a bit later to check the total number of images. Also made it easier to set the max number of images with the env variable.

Copy link
Member

@TheDen TheDen left a comment

Choose a reason for hiding this comment

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

LGTM 👍

In different PRs, we can work on passing these env vars to the frontend, and solve the UX of conveying the max. image limit

@BradLewis BradLewis merged commit 44f2080 into main Aug 25, 2023
8 checks passed
@BradLewis BradLewis deleted the feature/improve-configuration branch August 25, 2023 10:51
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