on browsing getting directories list

General Discussion

Suggested Topics

  • 0 Votes
    4 Posts

    Unfortunately the "GET API" as you call it is integral to the functionality of NodeBB on the client-side. During the normal usage of NodeBB, it is constantly using the /api to load new pages, etc. It's not something that can be turned off, but it might be possible to restrict it to only accessible to users with a certain cookie. This doesn't currently exist, though.

    You can open an issue on Github if you'd like this looked into further.

  • 1 Votes
    15 Posts

    @rod It's nothing special, it's just a habit that I have trained myself into.

    The reason I check for the existence of app.user is because you cannot reference an object property (that is, the uid property of the user object in app) if the object itself does not exist. You'll get a javascript error (ReferenceError: user is not defined).

    If there's even a chance the parent object is not defined, I make a check for it first (though app is always defined in NodeBB, so I skip that).

    The proper way to write it would be: if (app.hasOwnProperty('user')), but even sometimes that can be tripped up if app.user is a property, but undefined 😄

  • 0 Votes
    3 Posts

    Maybe full matches should outrank others too, if I type in the exact match it would be good if I had a way to always get that rather than going through a list of longer partial matches.

    In some cases we might end up with a huge number of matches, potentially.

  • 0 Votes
    4 Posts

    I changed the action mouse pointer on my website to this on April 1st.

    I didn't bother removing it. 😆

  • 0 Votes
    7 Posts

    Looks fine to me as well, confirmed here.
    Screen Shot 2014-05-27 at 2.59.52 PM.png