mirror of
https://github.com/aljazceru/ditto.git
synced 2026-01-21 22:34:24 +01:00
Add back block controllers, but 422 them
This commit is contained in:
@@ -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,
|
||||
|
||||
6
src/controllers/api/blocks.ts
Normal file
6
src/controllers/api/blocks.ts
Normal 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);
|
||||
};
|
||||
Reference in New Issue
Block a user