Skip to content

Commit 93c0f45

Browse files
committed
fix: Handle inactiveReason null from DB in users.create response
Strip null inactiveReason before returning user to satisfy Typia IUser schema validation. Same workaround used by users.register.
1 parent 02bb817 commit 93c0f45

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

apps/meteor/app/api/server/v1/users.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -937,6 +937,10 @@ const usersEndpoints = API.v1
937937
return API.v1.failure('User not found');
938938
}
939939

940+
if ((user as unknown as Record<string, unknown>).inactiveReason === null) {
941+
delete (user as unknown as Record<string, unknown>).inactiveReason;
942+
}
943+
940944
return API.v1.success({ user });
941945
},
942946
);

0 commit comments

Comments
 (0)