Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Churros
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Antoine Lebeault
Churros
Commits
b313e148
Commit
b313e148
authored
Sep 8, 2023
by
Ewen Le Bihan
Browse files
Options
Downloads
Patches
Plain Diff
refactor(login): remove useless nested try-catch blocks
parent
452a9847
Branches
Branches containing commit
Tags
v0.16.6
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/api/src/objects/credentials.ts
+29
-37
29 additions, 37 deletions
packages/api/src/objects/credentials.ts
with
29 additions
and
37 deletions
packages/api/src/objects/credentials.ts
+
29
−
37
View file @
b313e148
...
...
@@ -171,7 +171,6 @@ builder.mutationField('login', (t) =>
user
.
uid
);
if
(
!
ldapUser
)
{
try
{
// Try to find them in the school's LDAP
const
schoolUser
=
await
getSupannAliasLogin
(
user
.
email
);
// eslint-disable-next-line max-depth, no-negated-condition
...
...
@@ -186,7 +185,6 @@ builder.mutationField('login', (t) =>
// Create the LDAP entry
await
log
(
'
login/ldap-sync
'
,
'
start
'
,
{
user
},
user
.
uid
);
const
schoolEmail
=
`
${
schoolUser
.
supannAliasLogin
}
@etu.inp-n7.fr`
;
try
{
await
createLdapUser
(
{
...
user
,
...
...
@@ -202,12 +200,6 @@ builder.mutationField('login', (t) =>
schoolUid
:
schoolUser
.
schoolUid
,
},
});
}
catch
(
error
)
{
await
log
(
'
login/ldap-sync
'
,
'
error
'
,
{
err
:
error
},
user
.
uid
);
}
}
}
catch
(
error
)
{
await
log
(
'
login/ldap-sync
'
,
'
error
'
,
{
err
:
error
},
user
.
uid
);
}
}
}
catch
(
error
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment