480655a0ee 
							
						 
					 
					
						
						
							
							refactor(server/middleware): update current user middleware  
						
						... 
						
						
						
						- check for titlecased version of auth header
- check for token's `sub` field as well as `id`
- ensure we don't select sensitive info when querying the user
- don't throw if there's no user logged in for that request 
						
						
					 
					
						2024-12-09 15:34:30 -05:00 
						 
				 
			
				
					
						
					 
					
						
						
							
							
								
									
								
							
						
						
						
							
						
						
							4139f6fd58 
							
						 
					 
					
						
						
							
							refactor(api): remove auth cookie checks  
						
						... 
						
						
						
						just get the authorization header 
						
						
					 
					
						2024-03-21 18:34:46 -04:00 
						 
				 
			
				
					
						
					 
					
						
						
							
							
								
									
								
							
						
						
						
							
						
						
							c2ac9e6318 
							
						 
					 
					
						
						
							
							fix(server/middleware): import messages from constants  
						
						
						
						
					 
					
						2023-12-31 14:23:22 -05:00 
						 
				 
			
				
					
						
					 
					
						
						
							
							
								
									
								
							
						
						
						
							
						
						
							f2e40dabf5 
							
						 
					 
					
						
						
							
							fix(build): remove oauth imports  
						
						... 
						
						
						
						not yet! 
						
						
					 
					
						2023-12-30 17:36:22 -05:00 
						 
				 
			
				
					
						
					 
					
						
						
							
							
								
									
								
							
						
						
						
							
						
						
							8f45dbe563 
							
						 
					 
					
						
						
							
							style(*): edit indents  
						
						
						
						
					 
					
						2023-12-29 20:53:29 -05:00 
						 
				 
			
				
					
						
					 
					
						
						
							
							
								
									
								
							
						
						
						
							
						
						
							c8e84c909e 
							
						 
					 
					
						
						
							
							style(*): cleanup unused imports  
						
						
						
						
					 
					
						2023-12-29 20:11:07 -05:00 
						 
				 
			
				
					
						
					 
					
						
						
							
							
								
									
								
							
						
						
						
							
						
						
							3e5af47107 
							
						 
					 
					
						
						
							
							refactor(*): refactor tsconfig paths  
						
						... 
						
						
						
						looks/feels nicer 
						
						
					 
					
						2023-12-20 17:23:31 -05:00 
						 
				 
			
				
					
						
					 
					
						
						
							
							
								
									
								
							
						
						
						
							
						
						
							bd9e3d5336 
							
						 
					 
					
						
						
							
							feat(server/middleware): add middleware to track ip addresses on each logged-in request  
						
						
						
						
					 
					
						2023-10-11 13:24:44 -04:00 
						 
				 
			
				
					
						
					 
					
						
						
							
							
								
									
								
							
						
						
						
							
						
						
							f235d7da44 
							
						 
					 
					
						
						
							
							fix(server/middleware): ficmas middleware scans the current year instead of what's in the .env file  
						
						... 
						
						
						
						truly automatic! 
						
						
					 
					
						2023-10-10 22:13:26 -04:00 
						 
				 
			
				
					
						
					 
					
						
						
							
							
								
									
								
							
						
						
						
							
						
						
							d67530eb64 
							
						 
					 
					
						
						
							
							refactor(server/middleware): rename currentUser middleware  
						
						
						
						
					 
					
						2023-10-10 21:56:25 -04:00 
						 
				 
			
				
					
						
					 
					
						
						
							
							
								
									
								
							
						
						
						
							
						
						
							a6dd1002e2 
							
						 
					 
					
						
						
							
							refactor(server/middleware): update middlewares to use winston logger instead of plain console.log  
						
						
						
						
					 
					
						2023-10-05 02:07:05 -04:00 
						 
				 
			
				
					
						
					 
					
						
						
							
							
								
									
								
							
						
						
						
							
						
						
							6167a9ea70 
							
						 
					 
					
						
						
							
							style: run prettier  
						
						
						
						
					 
					
						2023-10-03 01:19:36 -04:00 
						 
				 
			
				
					
						
					 
					
						
						
							
							
								
									
								
							
						
						
						
							
						
						
							da700b90d5 
							
						 
					 
					
						
						
							
							feat(server/middleware): create request logging middleware  
						
						
						
						
					 
					
						2023-10-03 00:58:05 -04:00 
						 
				 
			
				
					
						
					 
					
						
						
							
							
								
									
								
							
						
						
						
							
						
						
							84502b68b8 
							
						 
					 
					
						
						
							
							fix(server/middleware): add guard against setting event.context.currentUser to null  
						
						
						
						
					 
					
						2023-10-03 00:57:21 -04:00 
						 
				 
			
				
					
						
					 
					
						
						
							
							
								
									
								
							
						
						
						
							
						
						
							643c8b3c77 
							
						 
					 
					
						
						
							
							refactor(server/middleware): create middleware to add the current story's chapter index to the context as an int (if it exists)  
						
						... 
						
						
						
						because convenience 
						
						
					 
					
						2023-10-03 00:56:16 -04:00 
						 
				 
			
				
					
						
					 
					
						
						
							
							
								
									
								
							
						
						
						
							
						
						
							cfb1f69ffb 
							
						 
					 
					
						
						
							
							refactor(server/middleware): move common logic for maintaining a database connection to another file  
						
						
						
						
					 
					
						2023-10-02 16:08:12 -04:00 
						 
				 
			
				
					
						
					 
					
						
						
							
							
								
									
								
							
						
						
						
							
						
						
							2b233364a1 
							
						 
					 
					
						
						
							
							refactor(api): refactor app to use pure jwts instead of cookies  
						
						... 
						
						
						
						cookies are no longer used 
						
						
					 
					
						2023-09-28 21:55:19 -04:00 
						 
				 
			
				
					
						
					 
					
						
						
							
							
								
									
								
							
						
						
						
							
						
						
							421a283d6c 
							
						 
					 
					
						
						
							
							refactor(server/middleware): inject ficmas data into request context via middleware  
						
						... 
						
						
						
						to make sure people can't see ficmas stories in listings 
						
						
					 
					
						2023-09-25 19:53:01 -04:00 
						 
				 
			
				
					
						
					 
					
						
						
							
							
								
									
								
							
						
						
						
							
						
						
							2ea40ebb07 
							
						 
					 
					
						
						
							
							refactor(server/middleware): add middleware to "persist" mongoose's database connection  
						
						
						
						
					 
					
						2023-09-25 19:50:07 -04:00 
						 
				 
			
				
					
						
					 
					
						
						
							
							
								
									
								
							
						
						
						
							
						
						
							f0a006b3d5 
							
						 
					 
					
						
						
							
							feat(server/middleware): add the h3 equivalent of req.user to incoming request contexts  
						
						
						
						
					 
					
						2023-09-25 19:33:02 -04:00