Rename blocks to mutes in the API

This commit is contained in:
Alex Gleason
2024-05-02 15:26:46 -05:00
parent b219a21a2a
commit 4c71dec6ce
3 changed files with 15 additions and 15 deletions

View File

@@ -272,8 +272,8 @@ const followingController: AppController = async (c) => {
return renderAccounts(c, pubkeys);
};
/** https://docs.joinmastodon.org/methods/accounts/#block */
const blockController: AppController = async (c) => {
/** https://docs.joinmastodon.org/methods/accounts/#mute */
const muteController: AppController = async (c) => {
const sourcePubkey = c.get('pubkey')!;
const targetPubkey = c.req.param('pubkey');
@@ -287,8 +287,8 @@ const blockController: AppController = async (c) => {
return c.json(relationship);
};
/** https://docs.joinmastodon.org/methods/accounts/#unblock */
const unblockController: AppController = async (c) => {
/** https://docs.joinmastodon.org/methods/accounts/#unmute */
const unmuteController: AppController = async (c) => {
const sourcePubkey = c.get('pubkey')!;
const targetPubkey = c.req.param('pubkey');
@@ -328,15 +328,15 @@ export {
accountLookupController,
accountSearchController,
accountStatusesController,
blockController,
createAccountController,
favouritesController,
followController,
followersController,
followingController,
muteController,
relationshipsController,
unblockController,
unfollowController,
unmuteController,
updateCredentialsController,
verifyCredentialsController,
};

View File

@@ -3,8 +3,8 @@ import { Storages } from '@/storages.ts';
import { getTagSet } from '@/tags.ts';
import { renderAccounts } from '@/views.ts';
/** https://docs.joinmastodon.org/methods/blocks/#get */
const blocksController: AppController = async (c) => {
/** https://docs.joinmastodon.org/methods/mutes/#get */
const mutesController: AppController = async (c) => {
const pubkey = c.get('pubkey')!;
const { signal } = c.req.raw;
@@ -21,4 +21,4 @@ const blocksController: AppController = async (c) => {
}
};
export { blocksController };
export { mutesController };