Add back block controllers, but 422 them

This commit is contained in:
Alex Gleason
2024-05-02 15:34:17 -05:00
parent 4c71dec6ce
commit 09c596c9e4
3 changed files with 24 additions and 0 deletions

View File

@@ -272,6 +272,16 @@ const followingController: AppController = async (c) => {
return renderAccounts(c, pubkeys);
};
/** https://docs.joinmastodon.org/methods/accounts/#block */
const blockController: AppController = (c) => {
return c.json({ error: 'Blocking is not supported by Nostr' }, 422);
};
/** https://docs.joinmastodon.org/methods/accounts/#unblock */
const unblockController: AppController = (c) => {
return c.json({ error: 'Blocking is not supported by Nostr' }, 422);
};
/** https://docs.joinmastodon.org/methods/accounts/#mute */
const muteController: AppController = async (c) => {
const sourcePubkey = c.get('pubkey')!;
@@ -328,6 +338,7 @@ export {
accountLookupController,
accountSearchController,
accountStatusesController,
blockController,
createAccountController,
favouritesController,
followController,
@@ -335,6 +346,7 @@ export {
followingController,
muteController,
relationshipsController,
unblockController,
unfollowController,
unmuteController,
updateCredentialsController,

View File

@@ -0,0 +1,6 @@
import { AppController } from '@/app.ts';
/** https://docs.joinmastodon.org/methods/blocks/#get */
export const blocksController: AppController = (c) => {
return c.json({ error: 'Blocking is not supported by Nostr' }, 422);
};