mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-04 07:24:13 +00:00 
			
		
		
		
	[API] Improve: Better error message
This commit is contained in:
		
							parent
							
								
									fef3d3f300
								
							
						
					
					
						commit
						89a3d6789c
					
				
					 2 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -47,7 +47,7 @@ export default (req: express.Request) => new Promise<IAuthContext>(async (resolv
 | 
			
		|||
		});
 | 
			
		||||
 | 
			
		||||
		if (accessToken === null) {
 | 
			
		||||
			return reject('invalid token');
 | 
			
		||||
			return reject('invalid signature');
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		const app = await App
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -68,7 +68,7 @@ function authenticate(connection: websocket.connection, token: string): Promise<
 | 
			
		|||
			});
 | 
			
		||||
 | 
			
		||||
			if (accessToken == null) {
 | 
			
		||||
				return reject('invalid token');
 | 
			
		||||
				return reject('invalid signature');
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			// Fetch user
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue