switch from req.session.jwt to cookies
This commit is contained in:
		
							
								
								
									
										16
									
								
								public/js/chat.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								public/js/chat.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,16 @@
 | 
			
		||||
$(document).ready(() => {
 | 
			
		||||
    const sendData = async () => {
 | 
			
		||||
        alert(1);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    $("#send-message-button").click(sendData);
 | 
			
		||||
 | 
			
		||||
    $('#chat-input').keyup(function(e){
 | 
			
		||||
        if(e.keyCode == 13)
 | 
			
		||||
        {
 | 
			
		||||
            $(this).trigger("enterKey");
 | 
			
		||||
        }
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    $("#chat-input").bind("enterKey", sendData);
 | 
			
		||||
});
 | 
			
		||||
		Reference in New Issue
	
	Block a user