修复关注
This commit is contained in:
@@ -16,6 +16,8 @@ import { ensureAdminUser } from "./db";
|
||||
import { HttpError, cors, json, svgResponse } from "./http";
|
||||
import {
|
||||
accountStatuses,
|
||||
accountFollowers,
|
||||
accountFollowing,
|
||||
authorize,
|
||||
authorizeFollowRequest,
|
||||
authorizePage,
|
||||
@@ -115,6 +117,8 @@ async function route(request: Request, env: Env): Promise<Response> {
|
||||
|
||||
if (method === "GET" && (m = path.match(/^\/api\/v1\/accounts\/([^/]+)$/))) return getAccount(env, decodeURIComponent(m[1]));
|
||||
if (method === "GET" && (m = path.match(/^\/api\/v1\/accounts\/([^/]+)\/statuses$/))) return accountStatuses(request, env, decodeURIComponent(m[1]));
|
||||
if (method === "GET" && (m = path.match(/^\/api\/v1\/accounts\/([^/]+)\/followers$/))) return accountFollowers(request, env, decodeURIComponent(m[1]));
|
||||
if (method === "GET" && (m = path.match(/^\/api\/v1\/accounts\/([^/]+)\/following$/))) return accountFollowing(request, env, decodeURIComponent(m[1]));
|
||||
if (method === "POST" && (m = path.match(/^\/api\/v1\/accounts\/([^/]+)\/follow$/))) return followAccount(request, env, decodeURIComponent(m[1]));
|
||||
if (method === "POST" && (m = path.match(/^\/api\/v1\/accounts\/([^/]+)\/unfollow$/))) return unfollowAccount(request, env, decodeURIComponent(m[1]));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user