Methods
# async static createUser(req, res) → {Promise.<void>}
Create a new user via the admin service.
Parameters:
| Name | Type | Description |
|---|---|---|
req |
ICreateUserRequest
|
Express request containing user data. |
res |
Response
|
Express response instance. |
Resolves when the response has been sent.
Promise.<void>
# async static deleteUser(req, res) → {Promise.<void>}
Delete a user via the admin service with auditing safeguards.
Parameters:
| Name | Type | Description |
|---|---|---|
req |
IRequestWithUser
|
Express request that includes the authenticated admin. |
res |
Response
|
Express response instance. |
Resolves when the response has been sent.
Promise.<void>
# async static getAllSmes(req, res) → {Promise.<void>}
Retrieve a paginated list of SMEs and admins.
Parameters:
| Name | Type | Description |
|---|---|---|
req |
IRequestWithUser
|
Express request with pagination query params. |
res |
Response
|
Express response instance. |
Resolves when the response has been sent.
Promise.<void>
# async static resetPassword(req, res) → {Promise.<void>}
Reset a user's password via the admin service.
Parameters:
| Name | Type | Description |
|---|---|---|
req |
IGenericBodyResponse.<IResetPasswordDto>
|
Express request body with reset DTO. |
res |
Response
|
Express response instance. |
Resolves when the response has been sent.
Promise.<void>
# async static updateUser(req, res) → {Promise.<void>}
Update limited user fields (name, role) via the auth service.
Parameters:
| Name | Type | Description |
|---|---|---|
req |
IGenericBodyResponse.<IUpdateUserDto>
|
Express request with update payload. |
res |
Response
|
Express response instance. |
Resolves when the response has been sent.
Promise.<void>