diff --git a/keyserver/src/responders/thread-responders.js b/keyserver/src/responders/thread-responders.js --- a/keyserver/src/responders/thread-responders.js +++ b/keyserver/src/responders/thread-responders.js @@ -3,6 +3,7 @@ import t from 'tcomb'; import type { TInterface, TUnion } from 'tcomb'; +import { calendarQueryValidator } from 'lib/types/entry-types.js'; import { threadSubscriptionValidator } from 'lib/types/subscription-types.js'; import { userSurfacedPermissionValidator } from 'lib/types/thread-permission-types.js'; import { threadTypes } from 'lib/types/thread-types-enum.js'; @@ -38,10 +39,7 @@ tUserID, } from 'lib/utils/validation-utils.js'; -import { - entryQueryInputValidator, - verifyCalendarQueryThreadIDs, -} from './entry-responders.js'; +import { verifyCalendarQueryThreadIDs } from './entry-responders.js'; import { modifyRole } from '../creators/role-creator.js'; import { createThread } from '../creators/thread-creator.js'; import { deleteRole } from '../deleters/role-deleters.js'; @@ -143,7 +141,7 @@ color: t.maybe(tColor), parentThreadID: t.maybe(tID), initialMemberIDs: t.maybe(t.list(tUserID)), - calendarQuery: t.maybe(entryQueryInputValidator), + calendarQuery: t.maybe(calendarQueryValidator), }; const newThreadRequestInputValidator: TUnion = t.union([ @@ -178,7 +176,7 @@ export const joinThreadRequestInputValidator: TInterface = tShape({ threadID: tID, - calendarQuery: t.maybe(entryQueryInputValidator), + calendarQuery: t.maybe(calendarQueryValidator), inviteLinkSecret: t.maybe(t.String), defaultSubscription: t.maybe(threadSubscriptionValidator), }); diff --git a/keyserver/src/responders/user-responders.js b/keyserver/src/responders/user-responders.js --- a/keyserver/src/responders/user-responders.js +++ b/keyserver/src/responders/user-responders.js @@ -91,7 +91,6 @@ } from 'lib/utils/validation-utils.js'; import { - entryQueryInputValidator, normalizeCalendarQuery, verifyCalendarQueryThreadIDs, } from './entry-responders.js'; @@ -495,7 +494,7 @@ usernameOrEmail: t.maybe(t.union([tEmail, tOldValidUsername])), password: tPassword, watchedIDs: t.list(tID), - calendarQuery: t.maybe(entryQueryInputValidator), + calendarQuery: t.maybe(calendarQueryValidator), deviceTokenUpdateRequest: t.maybe(deviceTokenUpdateRequestInputValidator), platformDetails: tPlatformDetails, source: t.maybe(t.enums.of(values(authActionSources))), @@ -592,7 +591,7 @@ tShape({ signature: t.String, message: t.String, - calendarQuery: entryQueryInputValidator, + calendarQuery: calendarQueryValidator, deviceTokenUpdateRequest: t.maybe(deviceTokenUpdateRequestInputValidator), platformDetails: tPlatformDetails, watchedIDs: t.list(tID), @@ -761,7 +760,7 @@ tShape({ userID: tUserID, deviceID: t.String, - calendarQuery: entryQueryInputValidator, + calendarQuery: calendarQueryValidator, deviceTokenUpdateRequest: t.maybe(deviceTokenUpdateRequestInputValidator), platformDetails: tPlatformDetails, watchedIDs: t.list(tID), @@ -895,7 +894,7 @@ code: t.String, password: tPassword, watchedIDs: t.list(tID), - calendarQuery: t.maybe(entryQueryInputValidator), + calendarQuery: t.maybe(calendarQueryValidator), deviceTokenUpdateRequest: t.maybe(deviceTokenUpdateRequestInputValidator), platformDetails: tPlatformDetails, });