mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-06 06:48:21 +00:00
Merge pull request #13329 from ToolJet/fix/platform-lts-mgs-3
Fix for SSO workspace login
This commit is contained in:
commit
4d8490b540
3 changed files with 6 additions and 6 deletions
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
|
|
@ -8,8 +8,8 @@
|
|||
"typescript",
|
||||
"typescriptreact"
|
||||
],
|
||||
"eslint.format.enable": true,
|
||||
"editor.formatOnSave": true,
|
||||
"eslint.format.enable": false,
|
||||
"editor.formatOnSave": false,
|
||||
"json.schemas": [
|
||||
{
|
||||
"fileMatch": [
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import { LicenseUserService } from '@modules/licensing/services/user.service';
|
|||
import { RolesUtilService } from '@modules/roles/util.service';
|
||||
import { OrganizationUser } from '../../entities/organization_user.entity';
|
||||
import { generateNextNameAndSlug } from 'src/helpers/utils.helper';
|
||||
const uuid = require('uuid');
|
||||
import * as uuid from 'uuid';
|
||||
import { Organization } from '../../entities/organization.entity';
|
||||
import { EntityManager } from 'typeorm';
|
||||
import {
|
||||
|
|
@ -121,7 +121,7 @@ export class AuthUtilService implements IAuthUtilService {
|
|||
try {
|
||||
const signedJwt = this.sessionUtilService.verifyToken(token);
|
||||
return signedJwt;
|
||||
} catch (err) {
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,8 +98,8 @@ export class UserRepository extends Repository<User> {
|
|||
const existingUser = await manager.findOne(User, { where: { email: user.email } });
|
||||
|
||||
if (existingUser) {
|
||||
Object.assign(existingUser, user);
|
||||
return manager.update(User, { id: existingUser.id }, user);
|
||||
await manager.update(User, { id: existingUser.id }, user);
|
||||
return manager.findOne(User, { where: { id: existingUser.id } });
|
||||
} else {
|
||||
const newUser = manager.create(User, user);
|
||||
return manager.save(User, newUser);
|
||||
|
|
|
|||
Loading…
Reference in a new issue