Formatting #6
This commit is contained in:
		@@ -61,7 +61,7 @@ const refresh = async (action: Action) => {
 | 
			
		||||
        throw new IllegalJWTError();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    const user = await getConnectionManager().get().getRepository(User).findOne({ id: jwtPayload["id"], refreshTokenCount: jwtPayload["refreshTokenCount"] }, { relations: ['permissions'] })
 | 
			
		||||
    const user = await getConnectionManager().get().getRepository(User).findOne({ id: jwtPayload["id"], refreshTokenCount: jwtPayload["refreshTokenCount"] }, { relations: ['permissions', 'groups', 'groups.permissions'] })
 | 
			
		||||
    if (!user) { throw new UserNonexistantOrRefreshtokenInvalidError() }
 | 
			
		||||
 | 
			
		||||
    let newAccess = JwtCreator.createAccess(user);
 | 
			
		||||
 
 | 
			
		||||
@@ -109,7 +109,7 @@ export class CreateUser {
 | 
			
		||||
                if (found.length === 0) {
 | 
			
		||||
                    errors++
 | 
			
		||||
                } else {
 | 
			
		||||
                    groups.push(found[0])
 | 
			
		||||
                    groups.push(found[0]);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            return groups;
 | 
			
		||||
 
 | 
			
		||||
@@ -23,7 +23,7 @@ export class RefreshAuth {
 | 
			
		||||
        } catch (error) {
 | 
			
		||||
            throw new IllegalJWTError()
 | 
			
		||||
        }
 | 
			
		||||
        const found_user = await getConnectionManager().get().getRepository(User).findOne({ id: decoded["id"] }, { relations: ['groups', 'permissions'] });
 | 
			
		||||
        const found_user = await getConnectionManager().get().getRepository(User).findOne({ id: decoded["id"] }, { relations: ['groups', 'permissions', 'groups.permissions'] });
 | 
			
		||||
        if (!found_user) {
 | 
			
		||||
            throw new UserNotFoundError()
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user