chore: update api v2 /me endpoint (#23984)

* fix: update profile me ednpoint to include name of user

* fix: update user schema

* pass name for user

* implement PR feedback

* chore: implement PR feedback

---------

Co-authored-by: Anik Dhabal Babu <[email protected]>
This commit is contained in:
Rajiv SahalandAnik Dhabal Babu authored and GitHub committed 2025-11-10 19:14:44 +00:00
1 parent 6d621e0b60
commit eae779b81c
3 files changed
+8

No files matched your search

@@ -30,6 +30,7 @@ describe("Me Endpoints", () => {
let profilesRepositoryFixture: ProfileRepositoryFixture;
let organizationsRepositoryFixture: OrganizationRepositoryFixture;
const userEmail = `me-controller-user-${randomString()}@api.com`;
const name = "Me Controller User";
let user: User;
let org: Team;
@@ -55,6 +56,7 @@ describe("Me Endpoints", () => {
user = await userRepositoryFixture.create({
email: userEmail,
username: userEmail,
name,
});
org = await organizationsRepositoryFixture.create({
@@ -92,6 +94,7 @@ describe("Me Endpoints", () => {
expect(responseBody.data.id).toEqual(user.id);
expect(responseBody.data.email).toEqual(user.email);
expect(responseBody.data.name).toEqual(user.name);
expect(responseBody.data.timeFormat).toEqual(user.timeFormat);
expect(responseBody.data.defaultScheduleId).toEqual(user.defaultScheduleId);
expect(responseBody.data.weekStart).toEqual(user.weekStart);
@@ -23,6 +23,10 @@ export class MeOutput {
@DocsProperty()
email!: string;
@IsString()
@DocsProperty({ type: String, nullable: true })
name!: string | null;
@IsInt()
@DocsProperty()
timeFormat!: number;