Skip to content

Commit

Permalink
Fix issue on login when no hooks are registered
Browse files Browse the repository at this point in the history
  • Loading branch information
rijkvanzanten committed May 14, 2021
1 parent 6f51fa4 commit e8ac74b
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 45 deletions.
3 changes: 2 additions & 1 deletion api/src/services/authentication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { createRateLimiter } from '../rate-limiter';
import { ActivityService } from '../services/activity';
import { AbstractServiceOptions, Accountability, Action, SchemaOverview, Session } from '../types';
import { SettingsService } from './settings';
import { merge } from 'lodash';

type AuthenticateOptions = {
email: string;
Expand Down Expand Up @@ -76,7 +77,7 @@ export class AuthenticationService {
});

if (updatedUser) {
user = updatedUser;
user = updatedUser.length > 0 ? updatedUser.reduce((val, acc) => merge(acc, val)) : user;
}

const emitStatus = (status: 'fail' | 'success') => {
Expand Down
88 changes: 44 additions & 44 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e8ac74b

Please sign in to comment.