Code Monkey home page Code Monkey logo

entrytohack3.0's People

Stargazers

 avatar  avatar

entrytohack3.0's Issues

TeamDashboard in spite of incorrect registration

Why are we adding the line

window.location.href = '/team/teamDashboard'

in the else block in the following code:

if (validateForm()) {

        $.ajax({
            url: '/team/student',
            type: 'POST',
            data: JSON.stringify({ members: teamDetails }),
            contentType: 'application/json; charset=utf-8',
            dataType: 'json',
            async: false,
            complete: function (msg) {
                console.log('Post request made successfully');
                window.location.href = '/team/teamDashboard';
            }
        });
    } else {
        alert("This team formation is not allowed. Please refer to the rules again! http://csec.nith.ac.in/hack/");
                    window.location.href = '/team/teamDashboard';
    }

The info when entered on student registration closes the server

the error seen is

TypeError: Cannot read property 'members' of null
at /home/newedia/Desktop/EntryToHack3.0/routes/student.js:53:58
at /home/newedia/Desktop/EntryToHack3.0/node_modules/mongoose/lib/model.js:4669:16
at /home/newedia/Desktop/EntryToHack3.0/node_modules/mongoose/lib/query.js:4090:12
at model.Query.Query._completeOne (/home/newedia/Desktop/EntryToHack3.0/node_modules/mongoose/lib/query.js:1934:12)
at Immediate.Query.base.findOne.call (/home/newedia/Desktop/EntryToHack3.0/node_modules/mongoose/lib/query.js:1994:10)
at Immediate._onImmediate (/home/newedia/Desktop/EntryToHack3.0/node_modules/mquery/lib/utils.js:116:16)
at runCallback (timers.js:794:20)
at tryOnImmediate (timers.js:752:5)
at processImmediate [as _immediateCallback] (timers.js:729:5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.