This change validates the input of the per page option so that it has to be one of the provided options. If an option does not match a provided option, it's set to the closest available option. For example, manually setting it to 100000 in the URL param will have it automatically set to the largest option, 50, while manually setting it to 1 will change it to 6, the smallest option.
Also made some small language adjustments to get everything to fit a little nicer in the mobile views.
Adds back in the Session attribute. Apparently if you add it first, before the Url attribute, you can alter the variables in the URL and the changes will stick around.
Much better, still not perfect. The mobile and the desktop components are being rendered twice, and each of their methods are running twice as well. Going to see if I can modify the structure to get away with only using one.
- When a new user is created using Discord OAuth information, if the username returned from Discord is already taken, append randomness to the end of the username.
- Validates that a new account name is unique.
- Validates that an updated account name is unique.
Reviewed the download count PR work and made some changes:
- Updated the download link route to include the mod's slug for easier identification.
- Moved rate limiter from the route middleware (the entire controller) to just the show method in the controller.
- Created a ModVersionPolicy that the controller can check against.
- Moves download increment logic into the model.
- Defers the call to the download increment logic (now run in the background)
- Updated the route to have a name, and the downloadUrl methods to build the URL dynamically using the route name.
- Wrote some tests to check URL building, download counting, and rate limiting.
# Conflicts:
# app/Http/Controllers/ModVersionController.php
# app/Providers/AppServiceProvider.php