feat(game): add screenshot upload moderation back-end infra and demo page#4770
Open
wescopeland wants to merge 1 commit intoRetroAchievements:masterfrom
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on #4739.
This PR adds the foundational back-end actions required for approving or rejecting player-uploaded screenshots, as well as a barebones demo page to test drive these actions. There is no Filament UI yet, that will be the next PR.
How to test this PR
In your .env:
Navigate to http://localhost:64000/demo/game-screenshot-moderation. This page is only accessible to users with
Role::ROOT.Assuming you have pending uploads from testing #4739, you'll see something that looks like this:

From here, you can approve or reject any of the pending screenshots. This page will be deleted in the next PR, it's just here for demo purposes to test the meat of the PR:
ApproveGameScreenshotActionandRejectGameScreenshotAction.On approve, you should observe:
game_screenshots, the screenshot markedapprovedand review metadata is recorded on its row.screenshotscollection, which triggers transforms in Horizon (PerformConversionsJob).replacedand no longer shown on the game page.replaced.On reject, you should observe:
rejectedand review metadata is recorded on its row.This is a sample of what I see in

game_screenshotsafter initiating some actions on the page: