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
aa0f656e
Commit
aa0f656e
authored
11 months ago
by
Henrik
Browse files
Options
Downloads
Patches
Plain Diff
feat: add reset password endpoints
parent
da2022bd
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#276772
failed
11 months ago
Stage: install_dependencies
Stage: lint
Stage: build_project
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/api/index.ts
+2
-1
2 additions, 1 deletion
src/api/index.ts
src/api/services/UserService.ts
+46
-6
46 additions, 6 deletions
src/api/services/UserService.ts
with
48 additions
and
7 deletions
src/api/index.ts
+
2
−
1
View file @
aa0f656e
...
...
@@ -12,6 +12,7 @@ export type { ExceptionResponse } from './models/ExceptionResponse';
export
type
{
LeaderboardDTO
}
from
'
./models/LeaderboardDTO
'
;
export
type
{
LeaderboardEntryDTO
}
from
'
./models/LeaderboardEntryDTO
'
;
export
type
{
LoginRequest
}
from
'
./models/LoginRequest
'
;
export
type
{
PasswordResetDTO
}
from
'
./models/PasswordResetDTO
'
;
export
type
{
ProfileDTO
}
from
'
./models/ProfileDTO
'
;
export
type
{
SignUpRequest
}
from
'
./models/SignUpRequest
'
;
export
type
{
UserDTO
}
from
'
./models/UserDTO
'
;
...
...
@@ -19,4 +20,4 @@ export type { UserUpdateDTO } from './models/UserUpdateDTO';
export
{
AuthenticationService
}
from
'
./services/AuthenticationService
'
;
export
{
LeaderboardService
}
from
'
./services/LeaderboardService
'
;
export
{
User
Controller
Service
}
from
'
./services/User
Controller
Service
'
;
export
{
UserService
}
from
'
./services/UserService
'
;
This diff is collapsed.
Click to expand it.
src/api/services/User
Controller
Service.ts
→
src/api/services/UserService.ts
+
46
−
6
View file @
aa0f656e
...
...
@@ -2,15 +2,55 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import
type
{
PasswordResetDTO
}
from
'
../models/PasswordResetDTO
'
;
import
type
{
ProfileDTO
}
from
'
../models/ProfileDTO
'
;
import
type
{
UserDTO
}
from
'
../models/UserDTO
'
;
import
type
{
UserUpdateDTO
}
from
'
../models/UserUpdateDTO
'
;
import
type
{
CancelablePromise
}
from
'
../core/CancelablePromise
'
;
import
{
OpenAPI
}
from
'
../core/OpenAPI
'
;
import
{
request
as
__request
}
from
'
../core/request
'
;
export
class
User
Controller
Service
{
export
class
UserService
{
/**
* Update profile
* Initiate a password reset
* Send a password reset mail to the user with the specified email
* @returns any Successfully initiated a password reset
* @throws ApiError
*/
public
static
resetPassword
({
requestBody
,
}:
{
requestBody
:
string
,
}):
CancelablePromise
<
any
>
{
return
__request
(
OpenAPI
,
{
method
:
'
POST
'
,
url
:
'
/api/users/reset-password
'
,
body
:
requestBody
,
mediaType
:
'
text/plain
'
,
});
}
/**
* Confirm a password reset
* Confirms a password reset using a token and a new password
* @returns void
* @throws ApiError
*/
public
static
confirmPasswordReset
({
requestBody
,
}:
{
requestBody
:
PasswordResetDTO
,
}):
CancelablePromise
<
void
>
{
return
__request
(
OpenAPI
,
{
method
:
'
POST
'
,
url
:
'
/api/users/confirm-password
'
,
body
:
requestBody
,
mediaType
:
'
application/json
'
,
errors
:
{
403
:
`Invalid token`
,
},
});
}
/**
* Update a profile
* Update the profile of the authenticated user
* @returns UserDTO Successfully updated profile
* @throws ApiError
...
...
@@ -28,8 +68,8 @@ export class UserControllerService {
});
}
/**
* Get profile
* Get
user
profile
* Get
a
profile
* Get
the
profile
of a user
* @returns ProfileDTO Successfully got profile
* @throws ApiError
*/
...
...
@@ -47,8 +87,8 @@ export class UserControllerService {
});
}
/**
* Get user
* Get user information
* Get
the authenticated
user
* Get
all
user information
for the authenticated user
* @returns UserDTO Successfully got user
* @throws ApiError
*/
...
...
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