Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ describe("StitchUserProfile", () => {
expect(stitchUserProfileImpl.gender).toEqual(GENDER);
expect(stitchUserProfileImpl.birthday).toEqual(BIRTHDAY);
expect(stitchUserProfileImpl.pictureUrl).toEqual(PICTURE_URL);
expect(stitchUserProfileImpl.minAge).toEqual(Number.parseInt(MIN_AGE, 10));
expect(stitchUserProfileImpl.maxAge).toEqual(Number.parseInt(MAX_AGE, 10));
expect(stitchUserProfileImpl.minAge).toEqual(MIN_AGE);
expect(stitchUserProfileImpl.maxAge).toEqual(MAX_AGE);
expect(stitchUserProfileImpl.userType).toEqual("local-userpass");
expect(stitchUserProfileImpl.identities.length).toEqual(1);
expect(stitchUserProfileImpl.identities[0]).toEqual(anonIdentity);
Expand Down
4 changes: 2 additions & 2 deletions packages/core/sdk/src/auth/StitchUserProfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ export default interface StitchUserProfile {
/**
* The minimum age of the user.
*/
readonly minAge?: number;
readonly minAge?: string;

/**
* The maximum age of the user.
*/
readonly maxAge?: number;
readonly maxAge?: string;
}
8 changes: 4 additions & 4 deletions packages/core/sdk/src/auth/internal/StitchUserProfileImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,22 +111,22 @@ export default class StitchUserProfileImpl implements IStitchUserProfile {
/**
* The minimum age of the user.
*/
get minAge(): number | undefined {
get minAge(): string | undefined {
const age = this.data[MIN_AGE];
if (age === undefined) {
return undefined;
}
return +age;
return age;
}

/**
* The maximum age of the user.
*/
get maxAge(): number | undefined {
get maxAge(): string | undefined {
const age = this.data[MAX_AGE];
if (age === undefined) {
return undefined;
}
return +age;
return age;
}
}