8
caiofior
21d

My first promise in Javascript !!!

Comments
  • 12
    "I promise to make your life absolutely miserable"

    --Javascript's promise to you.
  • 2
    Promise, callback and await all in one piece of code 👌
  • 4
    Next step : parametrising queries with template literals (https://developer.mozilla.org/en-US... ) since you’re handling banking data and you don’t want sql injection
  • 1
    @2lazy2debug <--- listen to this guy
  • 2
    Nice SQL injection problems have you here
  • 1
    Im not a javascript person, but looks like you can just return the promise without awating it? Try remove the async keyword?

    (c#)
  • 3
    Running SQL queries direct from JS? 😬😬😬Maybe I’m too much of a traditionalist but back in my day we had something way more secure to handle that shit called the back end that ran on real strongly typed languages on real servers. But what do I know, I’m sure there’s a #yetanother JS library to do that for us now.
  • 0
    @asinglenoob Node JS is backend JavaScript, he could be using it
Your Job Suck?
Get a Better Job
Add Comment