From 6799ecfe41d8900a67cf4667333b363c980c574a Mon Sep 17 00:00:00 2001 From: Adam Chelminski Date: Tue, 27 Nov 2018 14:39:52 -0500 Subject: [PATCH] STITCH-2229 Change minAge and maxAge from Int to String --- .../core/sdk/__tests__/auth/StitchUserProfileUnitTests.ts | 4 ++-- packages/core/sdk/src/auth/StitchUserProfile.ts | 4 ++-- .../core/sdk/src/auth/internal/StitchUserProfileImpl.ts | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/core/sdk/__tests__/auth/StitchUserProfileUnitTests.ts b/packages/core/sdk/__tests__/auth/StitchUserProfileUnitTests.ts index 8fd00b727..4b53c78aa 100644 --- a/packages/core/sdk/__tests__/auth/StitchUserProfileUnitTests.ts +++ b/packages/core/sdk/__tests__/auth/StitchUserProfileUnitTests.ts @@ -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); diff --git a/packages/core/sdk/src/auth/StitchUserProfile.ts b/packages/core/sdk/src/auth/StitchUserProfile.ts index db836f77d..a1f32a8dd 100644 --- a/packages/core/sdk/src/auth/StitchUserProfile.ts +++ b/packages/core/sdk/src/auth/StitchUserProfile.ts @@ -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; } diff --git a/packages/core/sdk/src/auth/internal/StitchUserProfileImpl.ts b/packages/core/sdk/src/auth/internal/StitchUserProfileImpl.ts index fbd14d72b..070f491b4 100644 --- a/packages/core/sdk/src/auth/internal/StitchUserProfileImpl.ts +++ b/packages/core/sdk/src/auth/internal/StitchUserProfileImpl.ts @@ -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; } }