Skip to content

Add endpoint : for admin password update #12

Description

@aditysoni

Proposed endpoint :
POST /dashboard/v1/admin-change-password

Request

POST /dashboard/v1/admin-change-password
Content-Type: application/json

{
"username": "string, required",
"currentPassword": "string, required",
"newPassword": "string, required"
}

Response — success (HTTP 200)

{
"status": true,
"message": "Password updated successfully."
}

Response failure

{
"status": false,
"message": "message",
}

Message for the Failure response

Case HTTP message
Wrong current password 401 Incorrect credentials
Unknown username 401 Incorrect credentials
New password fails policy 400 e.g. Password must be at least 8 characters.
New password same as current 400 New password must differ from the current one.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions