Page MenuHomePhabricator

D11604.diff
No OneTemporary

D11604.diff

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

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)

Event Timeline