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
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
e717cdca
Commit
e717cdca
authored
2 years ago
by
Rémi PAILHAREY
Browse files
Options
Downloads
Patches
Plain Diff
feat(profile): logged in users can access the profile of other users
parent
25b2529a
No related branches found
No related tags found
4 merge requests
!247
V2.1.0
,
!242
V2.0
,
!185
Feat/us178 user profile
,
!127
V2.0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/users/controllers/users.controller.ts
+5
-1
5 additions, 1 deletion
src/users/controllers/users.controller.ts
with
5 additions
and
1 deletion
src/users/controllers/users.controller.ts
+
5
−
1
View file @
e717cdca
...
...
@@ -197,7 +197,11 @@ export class UsersController {
@
Get
(
'
:id
'
)
@
ApiParam
({
name
:
'
id
'
,
type
:
String
,
required
:
true
})
public
async
getUser
(@
Param
()
params
):
Promise
<
IUser
>
{
return
this
.
usersService
.
findById
(
params
.
id
);
const
user
=
await
this
.
usersService
.
findById
(
params
.
id
);
if
(
!
user
)
{
throw
new
HttpException
(
'
User does not exist
'
,
HttpStatus
.
NOT_FOUND
);
}
return
user
;
}
@
ApiResponse
({
status
:
HttpStatus
.
CREATED
,
description
:
'
Description updated
'
})
...
...
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