Page MenuHomePhabricator

D11814.diff
No OneTemporary

D11814.diff

diff --git a/keyserver/src/endpoints.js b/keyserver/src/endpoints.js
--- a/keyserver/src/endpoints.js
+++ b/keyserver/src/endpoints.js
@@ -47,7 +47,9 @@
} from './responders/entry-responders.js';
import {
createOrUpdateFarcasterChannelTagResponder,
+ deleteFarcasterChannelTagResponder,
createOrUpdateFarcasterChannelTagInputValidator,
+ deleteFarcasterChannelTagInputValidator,
createOrUpdateFarcasterChannelTagResponseValidator,
} from './responders/farcaster-channel-tag-responders.js';
import type { JSONResponder } from './responders/handlers.js';
@@ -586,6 +588,12 @@
createOrUpdateFarcasterChannelTagResponseValidator,
baseLegalPolicies,
),
+ delete_farcaster_channel_tag: createJSONResponder(
+ deleteFarcasterChannelTagResponder,
+ deleteFarcasterChannelTagInputValidator,
+ t.Nil,
+ baseLegalPolicies,
+ ),
};
export { jsonEndpoints };
diff --git a/keyserver/src/responders/farcaster-channel-tag-responders.js b/keyserver/src/responders/farcaster-channel-tag-responders.js
--- a/keyserver/src/responders/farcaster-channel-tag-responders.js
+++ b/keyserver/src/responders/farcaster-channel-tag-responders.js
@@ -5,19 +5,21 @@
import type {
CreateOrUpdateFarcasterChannelTagRequest,
CreateOrUpdateFarcasterChannelTagResponse,
+ DeleteFarcasterChannelTagRequest,
} from 'lib/types/community-types';
import { tShape, tID } from 'lib/utils/validation-utils.js';
import { createOrUpdateFarcasterChannelTag } from '../creators/farcaster-channel-tag-creator.js';
+import { deleteFarcasterChannelTag } from '../deleters/farcaster-channel-tag-deleters.js';
import type { Viewer } from '../session/viewer';
-export const createOrUpdateFarcasterChannelTagInputValidator: TInterface<CreateOrUpdateFarcasterChannelTagRequest> =
+const createOrUpdateFarcasterChannelTagInputValidator: TInterface<CreateOrUpdateFarcasterChannelTagRequest> =
tShape<CreateOrUpdateFarcasterChannelTagRequest>({
commCommunityID: tID,
farcasterChannelID: t.String,
});
-export const createOrUpdateFarcasterChannelTagResponseValidator: TInterface<CreateOrUpdateFarcasterChannelTagResponse> =
+const createOrUpdateFarcasterChannelTagResponseValidator: TInterface<CreateOrUpdateFarcasterChannelTagResponse> =
tShape<CreateOrUpdateFarcasterChannelTagResponse>({
commCommunityID: tID,
blobHolder: t.String,
@@ -30,4 +32,24 @@
return await createOrUpdateFarcasterChannelTag(viewer, request);
}
-export { createOrUpdateFarcasterChannelTagResponder };
+const deleteFarcasterChannelTagInputValidator: TInterface<DeleteFarcasterChannelTagRequest> =
+ tShape<DeleteFarcasterChannelTagRequest>({
+ commCommunityID: tID,
+ farcasterChannelID: t.String,
+ blobHolder: t.String,
+ });
+
+async function deleteFarcasterChannelTagResponder(
+ viewer: Viewer,
+ request: DeleteFarcasterChannelTagRequest,
+): Promise<void> {
+ await deleteFarcasterChannelTag(viewer, request);
+}
+
+export {
+ createOrUpdateFarcasterChannelTagResponder,
+ createOrUpdateFarcasterChannelTagInputValidator,
+ createOrUpdateFarcasterChannelTagResponseValidator,
+ deleteFarcasterChannelTagResponder,
+ deleteFarcasterChannelTagInputValidator,
+};
diff --git a/lib/types/endpoints.js b/lib/types/endpoints.js
--- a/lib/types/endpoints.js
+++ b/lib/types/endpoints.js
@@ -114,6 +114,7 @@
VERSION: 'version',
CREATE_OR_UPDATE_FARCASTER_CHANNEL_TAG:
'create_or_update_farcaster_channel_tag',
+ DELETE_FARCASTER_CHANNEL_TAG: 'delete_farcaster_channel_tag',
});
type HTTPPreferredEndpoint = $Values<typeof httpPreferredEndpoints>;

File Metadata

Mime Type
text/plain
Expires
Wed, Jan 8, 3:49 PM (3 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2819847
Default Alt Text
D11814.diff (3 KB)

Event Timeline