NodeJs: Is there a way to exit the whole function instead of just the internal function with return?

So I have this function

app.post('/assignment/loan', (req, res) => {

And inside that function I have this function

db.run('SELECT loanable FROM book WHERE id=?',[bookID],(err,row)=>{

I use return but it only exits the internal function and keeps on going with the rest. I want to stop the whole post function from executing further. Is there a way to do that?

Thank you in advance.