fix(auth): include accountTier and isAdmin in GET /api/users/me response

This commit is contained in:
Radosław Gierwiało
2025-12-09 18:24:58 +01:00
parent d780b544b0
commit 3195ce3450
2 changed files with 4 additions and 0 deletions

View File

@@ -147,6 +147,8 @@ describe('User Profiles API Tests', () => {
expect(response.body.data).toHaveProperty('firstName', testUser1.firstName); expect(response.body.data).toHaveProperty('firstName', testUser1.firstName);
expect(response.body.data).toHaveProperty('lastName', testUser1.lastName); expect(response.body.data).toHaveProperty('lastName', testUser1.lastName);
expect(response.body.data).toHaveProperty('wsdcId', testUser1.wsdcId); expect(response.body.data).toHaveProperty('wsdcId', testUser1.wsdcId);
expect(response.body.data).toHaveProperty('accountTier');
expect(response.body.data).toHaveProperty('isAdmin');
expect(response.body.data).toHaveProperty('country', testUser1.country); expect(response.body.data).toHaveProperty('country', testUser1.country);
expect(response.body.data).toHaveProperty('city', testUser1.city); expect(response.body.data).toHaveProperty('city', testUser1.city);
expect(response.body.data).toHaveProperty('youtubeUrl', testUser1.youtubeUrl); expect(response.body.data).toHaveProperty('youtubeUrl', testUser1.youtubeUrl);

View File

@@ -20,6 +20,8 @@ router.get('/me', authenticate, async (req, res, next) => {
firstName: true, firstName: true,
lastName: true, lastName: true,
wsdcId: true, wsdcId: true,
accountTier: true,
isAdmin: true,
youtubeUrl: true, youtubeUrl: true,
instagramUrl: true, instagramUrl: true,
facebookUrl: true, facebookUrl: true,