Advertisement
Guest User

Untitled

a guest
May 1st, 2020
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(document).on('click','#rem-bot-link',function(e){
  2.     e.preventDefault();
  3.     $.ajax({
  4.         type: 'POST',
  5.         url: '/panel/del-link',
  6.         data:{
  7.             linkId: $('.link-button').val()
  8.         },
  9.         success: function(item){
  10.  
  11.         },
  12.         error: function(error){
  13.             console.log(error);
  14.         }
  15.     })
  16. });
  17.  
  18. router.post('/del-link',(request,response)=>{
  19.     models.db.m_l.destroy({
  20.         where: {id: request.body.linkId}
  21.     })
  22.         .catch(err=>console.log(err));
  23.     response.redirect('/panel/admin');
  24. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement