Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
idatt2106-2024-07
frontend
Commits
7f9fab88
Commit
7f9fab88
authored
11 months ago
by
Henrik
Browse files
Options
Downloads
Patches
Plain Diff
feat: add me endpoint
parent
4316114c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#275316
failed
11 months ago
Stage: install_dependencies
Stage: lint
Stage: build_project
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
spec.json
+12
-23
12 additions, 23 deletions
spec.json
src/api/services/UserControllerService.ts
+11
-18
11 additions, 18 deletions
src/api/services/UserControllerService.ts
with
23 additions
and
41 deletions
spec.json
+
12
−
23
View file @
7f9fab88
...
...
@@ -198,14 +198,14 @@
}
}
},
"/api/users/{userId}"
:
{
"/api/users/{userId}
/profile
"
:
{
"get"
:
{
"tags"
:
[
"user-controller"
],
"summary"
:
"Get
user
"
,
"description"
:
"Get user
information
"
,
"operationId"
:
"get
User
"
,
"summary"
:
"Get
profile
"
,
"description"
:
"Get user
profile
"
,
"operationId"
:
"get
Profile
"
,
"parameters"
:
[
{
"name"
:
"userId"
,
...
...
@@ -219,11 +219,11 @@
],
"responses"
:
{
"200"
:
{
"description"
:
"Successfully got
user
"
,
"description"
:
"Successfully got
profile
"
,
"content"
:
{
"application/json"
:
{
"schema"
:
{
"$ref"
:
"#/components/schemas/
User
DTO"
"$ref"
:
"#/components/schemas/
Profile
DTO"
}
}
}
...
...
@@ -231,32 +231,21 @@
}
}
},
"/api/users/
{userId}/profil
e"
:
{
"/api/users/
m
e"
:
{
"get"
:
{
"tags"
:
[
"user-controller"
],
"summary"
:
"Get profile"
,
"description"
:
"Get user profile"
,
"operationId"
:
"getProfile"
,
"parameters"
:
[
{
"name"
:
"userId"
,
"in"
:
"path"
,
"required"
:
true
,
"schema"
:
{
"type"
:
"integer"
,
"format"
:
"int64"
}
}
],
"summary"
:
"Get user"
,
"description"
:
"Get user information"
,
"operationId"
:
"getUser"
,
"responses"
:
{
"200"
:
{
"description"
:
"Successfully got
profile
"
,
"description"
:
"Successfully got
user
"
,
"content"
:
{
"application/json"
:
{
"schema"
:
{
"$ref"
:
"#/components/schemas/
Profile
DTO"
"$ref"
:
"#/components/schemas/
User
DTO"
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/api/services/UserControllerService.ts
+
11
−
18
View file @
7f9fab88
...
...
@@ -28,41 +28,34 @@ export class UserControllerService {
});
}
/**
* Get
user
* Get user
information
* @returns
User
DTO Successfully got
user
* Get
profile
* Get user
profile
* @returns
Profile
DTO Successfully got
profile
* @throws ApiError
*/
public
static
get
User
({
public
static
get
Profile
({
userId
,
}:
{
userId
:
number
,
}):
CancelablePromise
<
User
DTO
>
{
}):
CancelablePromise
<
Profile
DTO
>
{
return
__request
(
OpenAPI
,
{
method
:
'
GET
'
,
url
:
'
/api/users/{userId}
'
,
url
:
'
/api/users/{userId}
/profile
'
,
path
:
{
'
userId
'
:
userId
,
},
});
}
/**
* Get
profile
* Get user
profile
* @returns
Profile
DTO Successfully got
profile
* Get
user
* Get user
information
* @returns
User
DTO Successfully got
user
* @throws ApiError
*/
public
static
getProfile
({
userId
,
}:
{
userId
:
number
,
}):
CancelablePromise
<
ProfileDTO
>
{
public
static
getUser
():
CancelablePromise
<
UserDTO
>
{
return
__request
(
OpenAPI
,
{
method
:
'
GET
'
,
url
:
'
/api/users/{userId}/profile
'
,
path
:
{
'
userId
'
:
userId
,
},
url
:
'
/api/users/me
'
,
});
}
}
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