<commit_before>package controllers

import brainflight.security.Secured
import play.api.mvc.Controller
import models.User
import play.api.mvc.Action
import play.api.mvc.Request
import play.api.libs.json.Json._
import play.api.libs.json.JsValue
import play.api.libs.json._
import models.Role
import models.UserConfiguration

object UserController extends Controller with Secured {
  override val DefaultAccessRole = Role.User

  def verify( validationKey: String ) = Action {
    implicit request =>
      if ( User.verify( validationKey ) )
        Ok( "Thanks for your registration." )
      else
        BadRequest( "Unknown validation key." )
  }

  def saveSettings = Authenticated( parser = parse.json( maxLength = 512 ) ) {
    implicit request =>
      request.body.asOpt[JsObject] map { settings =><commit_msg>increased max payload for user configuration upload<commit_after>package controllers

import brainflight.security.Secured
import play.api.mvc.Controller
import models.User
import play.api.mvc.Action
import play.api.mvc.Request
import play.api.libs.json.Json._
import play.api.libs.json.JsValue
import play.api.libs.json._
import models.Role
import models.UserConfiguration

object UserController extends Controller with Secured {
  override val DefaultAccessRole = Role.User

  def verify( validationKey: String ) = Action {
    implicit request =>
      if ( User.verify( validationKey ) )
        Ok( "Thanks for your registration." )
      else
        BadRequest( "Unknown validation key." )
  }

  def saveSettings = Authenticated( parser = parse.json( maxLength = 2048 ) ) {
    implicit request =>
      request.body.asOpt[JsObject] map { settings =>
{'fraction_non_alphanumeric': 0.08835820895522388, 'fraction_numerical': 0.00417910447761194, 'mean_word_length': 3.774928774928775, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2998141', 'n_tokens_mistral': 478, 'n_tokens_neox': 460, 'n_words': 134}