<commit_before>submit_registration = (e) ->
  e.preventDefault()
  $.post "/api/user/create", $("#user-registration-form").serialize()
  .done (data) ->
    switch data['status']
      when 0
        $("#register-button").apiNotify(data, {position: "right"})
      when 1
        document.location.href = "/"

$ ->
  $("#user-registration-form").on "submit", submit_registration

  $("#new-team-registration").hide()
  $("#create-new-team").on "change", (e) ->
    $(".team-registration-form").toggle()
<commit_msg>Redirect to login page instead of home page after registration<commit_after>submit_registration = (e) ->
  e.preventDefault()
  $.post "/api/user/create", $("#user-registration-form").serialize()
  .done (data) ->
    switch data['status']
      when 0
        $("#register-button").apiNotify(data, {position: "right"})
      when 1
        document.location.href = "/login"

$ ->
  $("#user-registration-form").on "submit", submit_registration

  $("#new-team-registration").hide()
  $("#create-new-team").on "change", (e) ->
    $(".team-registration-form").toggle()

{'fraction_non_alphanumeric': 0.21033210332103322, 'fraction_numerical': 0.0036900369003690036, 'mean_word_length': 3.5208333333333335, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '1072731', 'n_tokens_mistral': 339, 'n_tokens_neox': 328, 'n_words': 62}