Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32216377
D11773.1765167023.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D11773.1765167023.diff
View Options
diff --git a/keyserver/src/endpoints.js b/keyserver/src/endpoints.js
--- a/keyserver/src/endpoints.js
+++ b/keyserver/src/endpoints.js
@@ -45,6 +45,11 @@
restoreEntryResponseValidator,
saveEntryRequestInputValidator,
} from './responders/entry-responders.js';
+import {
+ createOrUpdateFarcasterChannelTagResponder,
+ createOrUpdateFarcasterChannelTagInputValidator,
+ createOrUpdateFarcasterChannelTagResponseValidator,
+} from './responders/farcaster-channel-tag-responders.js';
import type { JSONResponder } from './responders/handlers.js';
import { createJSONResponder } from './responders/handlers.js';
import { getOlmSessionInitializationDataResponder } from './responders/keys-responders.js';
@@ -575,6 +580,12 @@
versionResponseValidator,
[],
),
+ create_or_update_farcaster_channel_tag: createJSONResponder(
+ createOrUpdateFarcasterChannelTagResponder,
+ createOrUpdateFarcasterChannelTagInputValidator,
+ createOrUpdateFarcasterChannelTagResponseValidator,
+ baseLegalPolicies,
+ ),
};
export { jsonEndpoints };
diff --git a/keyserver/src/responders/farcaster-channel-tag-responders.js b/keyserver/src/responders/farcaster-channel-tag-responders.js
new file mode 100644
--- /dev/null
+++ b/keyserver/src/responders/farcaster-channel-tag-responders.js
@@ -0,0 +1,33 @@
+// @flow
+
+import t, { type TInterface } from 'tcomb';
+
+import type {
+ CreateOrUpdateFarcasterChannelTagRequest,
+ CreateOrUpdateFarcasterChannelTagResponse,
+} from 'lib/types/community-types';
+import { tShape, tID } from 'lib/utils/validation-utils.js';
+
+import { createOrUpdateFarcasterChannelTag } from '../creators/farcaster-channel-tag-creator.js';
+import type { Viewer } from '../session/viewer';
+
+export const createOrUpdateFarcasterChannelTagInputValidator: TInterface<CreateOrUpdateFarcasterChannelTagRequest> =
+ tShape<CreateOrUpdateFarcasterChannelTagRequest>({
+ commCommunityID: tID,
+ farcasterChannelID: t.String,
+ });
+
+export const createOrUpdateFarcasterChannelTagResponseValidator: TInterface<CreateOrUpdateFarcasterChannelTagResponse> =
+ tShape<CreateOrUpdateFarcasterChannelTagResponse>({
+ commCommunityID: tID,
+ blobHolder: t.String,
+ });
+
+async function createOrUpdateFarcasterChannelTagResponder(
+ viewer: Viewer,
+ request: CreateOrUpdateFarcasterChannelTagRequest,
+): Promise<CreateOrUpdateFarcasterChannelTagResponse> {
+ return await createOrUpdateFarcasterChannelTag(viewer, request);
+}
+
+export { createOrUpdateFarcasterChannelTagResponder };
diff --git a/lib/types/endpoints.js b/lib/types/endpoints.js
--- a/lib/types/endpoints.js
+++ b/lib/types/endpoints.js
@@ -112,6 +112,8 @@
SEARCH_MESSAGES: 'search_messages',
GET_OLM_SESSION_INITIALIZATION_DATA: 'get_olm_session_initialization_data',
VERSION: 'version',
+ CREATE_OR_UPDATE_FARCASTER_CHANNEL_TAG:
+ 'create_or_update_farcaster_channel_tag',
});
type HTTPPreferredEndpoint = $Values<typeof httpPreferredEndpoints>;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 8, 4:10 AM (10 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5846409
Default Alt Text
D11773.1765167023.diff (2 KB)
Attached To
Mode
D11773: [keyserver] introduce create_or_update_farcaster_channel_tag endpoint
Attached
Detach File
Event Timeline
Log In to Comment