Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
web-et-numerique
Factory
Resin
Server
Commits
763165e3
Commit
763165e3
authored
4 years ago
by
Jérémie BRISON
Browse files
Options
Downloads
Patches
Plain Diff
fix claimed structure condition
parent
bb746cfd
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!27
Recette
,
!26
Dev
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/users/users.service.ts
+1
-3
1 addition, 3 deletions
src/users/users.service.ts
with
1 addition
and
3 deletions
src/users/users.service.ts
+
1
−
3
View file @
763165e3
...
@@ -284,9 +284,7 @@ export class UsersService {
...
@@ -284,9 +284,7 @@ export class UsersService {
}
}
public
async
isStructureClaimed
(
structureId
:
string
):
Promise
<
User
>
{
public
async
isStructureClaimed
(
structureId
:
string
):
Promise
<
User
>
{
return
this
.
userModel
return
this
.
userModel
.
findOne
({
structuresLink
:
parseInt
(
structureId
)
}).
exec
();
.
findOne
({
$or
:
[{
pendingStructuresLink
:
parseInt
(
structureId
)
},
{
structuresLink
:
parseInt
(
structureId
)
}]
})
.
exec
();
}
}
public
async
updateStructureLinked
(
userEmail
:
string
,
idStructure
:
number
):
Promise
<
number
[]
>
{
public
async
updateStructureLinked
(
userEmail
:
string
,
idStructure
:
number
):
Promise
<
number
[]
>
{
...
...
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