mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-26 10:14:54 +00:00
Merge pull request #255 from SyncrowIOT/return-project-uuid-in-user-details
Include project relation in user retrieval
This commit is contained in:
@ -30,7 +30,7 @@ export class UserService {
|
|||||||
where: {
|
where: {
|
||||||
uuid: userUuid,
|
uuid: userUuid,
|
||||||
},
|
},
|
||||||
relations: ['region', 'timezone', 'roleType'],
|
relations: ['region', 'timezone', 'roleType', 'project'],
|
||||||
});
|
});
|
||||||
if (!user) {
|
if (!user) {
|
||||||
throw new BadRequestException('Invalid room UUID');
|
throw new BadRequestException('Invalid room UUID');
|
||||||
@ -52,6 +52,7 @@ export class UserService {
|
|||||||
hasAcceptedAppAgreement: user?.hasAcceptedAppAgreement,
|
hasAcceptedAppAgreement: user?.hasAcceptedAppAgreement,
|
||||||
appAgreementAcceptedAt: user?.appAgreementAcceptedAt,
|
appAgreementAcceptedAt: user?.appAgreementAcceptedAt,
|
||||||
role: user?.roleType,
|
role: user?.roleType,
|
||||||
|
project: user?.project,
|
||||||
};
|
};
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (err instanceof BadRequestException) {
|
if (err instanceof BadRequestException) {
|
||||||
|
|||||||
Reference in New Issue
Block a user