Making uid more compatible
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			This commit is contained in:
		| @ -38,6 +38,7 @@ V1.post("/db/:database/query", async (ctx) => { | ||||
|  | ||||
|    if (authkey && db.publickey) { | ||||
|       let res = await verifyJWT(authkey, db.publickey); | ||||
|       if (res && !res.uid && res.user) res.uid = res.user; | ||||
|       if (!res || !res.uid) { | ||||
|          throw new BadRequestError("Invalid JWT"); | ||||
|       } else { | ||||
|  | ||||
| @ -55,6 +55,7 @@ export class WebsocketConnectionManager { | ||||
|       const authkey = query.get("authkey"); | ||||
|       if (authkey && db.publickey) { | ||||
|          let res = await verifyJWT(authkey, db.publickey); | ||||
|          if (res && !res.uid && res.user) res.uid = res.user; | ||||
|          if (!res || !res.uid) { | ||||
|             sendError("Invalid JWT"); | ||||
|             socket.close(); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Fabian Stamm
					Fabian Stamm