<commit_before>Router.map ->

  @route 'templates',
    path: '/templates'
    layout: 'basicLayout'
    waitOn: ->
        Meteor.subscribe 'Template'
    data: ->
        privateTemplates: Template.find({owner: Meteor.userId()}, {sort: {name: 1}})
    onBeforeAction: ->
        console.log("this.params: " + JSON.stringify(this.params))
        console.log("this.request: " + JSON.stringify(this.request))
        console.log("this.request.body: " + JSON.stringify(this.request.body))
        console.log("this.request.query: " + JSON.stringify(this.request.query))
        console.log("this.req: " + JSON.stringify(this.req))
        @next()


  @route 'managePrivate',
    path: '/manage/private'
    layout: 'basicLayout'
    waitOn: ->
        Meteor.subscribe 'Template'
    data: ->
        privateTemplates: Template.find({owner: Meteor.userId()}, {sort: {createdAt: 1}})


  @route 'createTemplate',
    path: '/template/create'
    layout: 'basicLayout'


  @route 'viewTemplate',
    path: '/template/:_id/view'
    layout: 'basicLayout'
    waitOn: ->
      [
        Meteor.subscribe 'Template'
      ]
    data: ->
        template: Template.findOne({$and: [{_id: this.params._id},{owner: Meteor.userId()}]})
<commit_msg>Added logic to get parameters from Box<commit_after>Router.map ->

  @route 'templates',
    path: '/templates'
    layout: 'basicLayout'
    waitOn: ->
        Meteor.subscribe 'Template'
    data: ->
        privateTemplates: Template.find({owner: Meteor.userId()}, {sort: {name: 1}})
    onBeforeAction: ->
        console.log("this.params: " + decodeURIComponent(JSON.stringify(this.params)))
        console.log("this.request: " + decodeURIComponent(JSON.stringify(this.request)))
        console.log("this.request.body: " + decodeURIComponent(JSON.stringify(this.request.body)))
        console.log("this.request.query: " + decodeURIComponent(JSON.stringify(this.request.query)))
        console.log("this.req: " + decodeURIComponent(JSON.stringify(this.req)))
        @next()


  @route 'managePrivate',
    path: '/manage/private'
    layout: 'basicLayout'
    waitOn: ->
        Meteor.subscribe 'Template'
    data: ->
        privateTemplates: Template.find({owner: Meteor.userId()}, {sort: {createdAt: 1}})


  @route 'createTemplate',
    path: '/template/create'
    layout: 'basicLayout'


  @route 'viewTemplate',
    path: '/template/:_id/view'
    layout: 'basicLayout'
    waitOn: ->
      [
        Meteor.subscribe 'Template'
      ]
    data: ->
        template: Template.findOne({$and: [{_id: this.params._id},{owner: Meteor.userId()}]})

{'fraction_non_alphanumeric': 0.1654482493266641, 'fraction_numerical': 0.0015390534821085034, 'mean_word_length': 3.0061633281972266, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, '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': '4012191', 'n_tokens_mistral': 827, 'n_tokens_neox': 808, 'n_words': 138}