<commit_before>define([
    'backbone',
    'collections/reports',
    'collections/types',
    'models/report',
    'models/user',
    'views/application',
    'views/index',
    'views/reports',
    'views/map',
    'views/create',
    'views/user',
    'views/settings',
    'views/nearby',
    'facebook'
], function (Backbone, ReportCollection, TypesCollection, ReportModel, UserModel, ApplicationView, IndexView, ReportsView, MapView, CreateView, UserView, SettingsView, NearbyView, FB) {
    'use strict';
    var router = Backbone.Router.extend({
        routes: {
            '': 'index',
            'reports': 'reports',
            'reports/:id': 'reports',
            'map': 'map',
            'create': 'create',
            'saved': 'saved',
            'user': 'user',
            'settings': 'settings',
            'login': 'login',
            'logout': 'logout',
            'nearby': 'nearby'
        },
        initialize: function() {
            var applicationView = new ApplicationView.Application();
            applicationView.render();
        },

        index: function() {
            var index = new IndexView();
            index.render();
        },

        login: function() {
            FB.login();
        },

        logout: function() {
            FB.logout(function() {
                Backbone.history.navigate('/', true);
            });
        },

        create: function() {
            TypesCollection.fetch({success: function(){
                var createview = new CreateView({collection: TypesCollection});
                createview.render();
            }, error: function(){

            }});

        },

        user: function() {
            var userview = new UserView({model: UserModel});
            userview.render();
        },

        settings: function() {
            var settingsView = new SettingsView();
            settingsView.render();
        },

        reports: function(id) {
            ReportCollection.fetch({success: function(){<commit_msg>redirect to /#reports when user logs in<commit_after>define([
    'backbone',
    'collections/reports',
    'collections/types',
    'models/report',
    'models/user',
    'views/application',
    'views/index',
    'views/reports',
    'views/map',
    'views/create',
    'views/user',
    'views/settings',
    'views/nearby',
    'facebook'
], function (Backbone, ReportCollection, TypesCollection, ReportModel, UserModel, ApplicationView, IndexView, ReportsView, MapView, CreateView, UserView, SettingsView, NearbyView, FB) {
    'use strict';
    var router = Backbone.Router.extend({
        routes: {
            '': 'index',
            'reports': 'reports',
            'reports/:id': 'reports',
            'map': 'map',
            'create': 'create',
            'saved': 'saved',
            'user': 'user',
            'settings': 'settings',
            'login': 'login',
            'logout': 'logout',
            'nearby': 'nearby'
        },
        initialize: function() {
            var applicationView = new ApplicationView.Application();
            applicationView.render();
        },

        index: function() {
            var index = new IndexView();
            index.render();
        },

        login: function() {
            FB.login(function(response) {
                Backbone.history.navigate('reports', true);
            });
        },

        logout: function() {
            FB.logout(function(response) {
                Backbone.history.navigate('/', true);
            });
        },

        create: function() {
            TypesCollection.fetch({success: function(){
                var createview = new CreateView({collection: TypesCollection});
                createview.render();
            }, error: function(){

            }});

        },

        user: function() {
            var userview = new UserView({model: UserModel});
            userview.render();
        },

        settings: function() {
            var settingsView = new SettingsView();
            settingsView.render();
        },

        reports: function(id) {
            ReportCollection.fetch({success: function(){
{'fraction_non_alphanumeric': 0.14367816091954022, 'fraction_numerical': 0.0, 'mean_word_length': 1.7589167767503302, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4596326', 'n_tokens_mistral': 1118, 'n_tokens_neox': 1072, 'n_words': 227}