Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3112015
D11604.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D11604.diff
View Options
diff --git a/keyserver/src/responders/relationship-responders.js b/keyserver/src/responders/relationship-responders.js
--- a/keyserver/src/responders/relationship-responders.js
+++ b/keyserver/src/responders/relationship-responders.js
@@ -6,18 +6,24 @@
type TraditionalRelationshipRequest,
type RelationshipErrors,
relationshipActionsList,
+ updateFarcasterRelationshipInputValidator,
} from 'lib/types/relationship-types.js';
import { tShape } from 'lib/utils/validation-utils.js';
import type { Viewer } from '../session/viewer.js';
import { updateRelationships } from '../updaters/relationship-updaters.js';
-export const updateRelationshipInputValidator: TInterface<TraditionalRelationshipRequest> =
+export const traditionalRelationshipRequestInputValidator: TInterface<TraditionalRelationshipRequest> =
tShape<TraditionalRelationshipRequest>({
action: t.enums.of(relationshipActionsList, 'relationship action'),
userIDs: t.list(t.String),
});
+export const updateRelationshipInputValidator = t.union([
+ traditionalRelationshipRequestInputValidator,
+ updateFarcasterRelationshipInputValidator,
+]);
+
export const relationshipErrorsValidator: TInterface<RelationshipErrors> =
tShape<RelationshipErrors>({
invalid_user: t.maybe(t.list(t.String)),
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 1, 4:02 PM (18 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2399237
Default Alt Text
D11604.diff (1 KB)
Attached To
Mode
D11604: [keyserver] Update `updateRelationshipInputValidator` to accept both traditional/farcaster requests
Attached
Detach File
Event Timeline
Log In to Comment