SudoSOS Back-end API / users / asUserResponse
Function: asUserResponse() ​
ts
function asUserResponse(
user,
timestamps?,
acceptedToS?): UserResponse;Parses a User entity to a UserResponse
Parameters ​
| Parameter | Type | Default value | Description |
|---|---|---|---|
user | User | undefined | User entity with loaded relations (especially memberUser) |
timestamps | boolean | false | Whether to include createdAt and updatedAt |
acceptedToS? | TermsOfServiceStatus | undefined | The user's computed TOS status. When omitted, acceptedToS is left undefined; use asUserResponses to populate it for a list of users. |