def METHOD_NAME(self, submission_id):
    submission = Submissions.query.filter_by(id=submission_id).first_or_404()
    req = request.get_json()
    submission_type = req.get("type")
    if submission_type == "correct":
        solve = Solves(
            user_id=submission.user_id,
            challenge_id=submission.challenge_id,
            team_id=submission.team_id,
            ip=submission.ip,
            provided=submission.provided,
            date=submission.date,
        )
        db.session.add(solve)
        submission.type = "discard"
        db.session.commit()
        # Delete standings cache
        clear_standings()
        clear_challenges()
        submission = solve
    schema = SubmissionSchema()
    response = schema.dump(submission)
    if response.errors:
        return {"success": False, "errors": response.errors}, 400
    return {"success": True, "data": response.data}