From f1451c659d1b097ceb303cb54d8706b4aecce9a6 Mon Sep 17 00:00:00 2001 From: naskya Date: Sun, 3 Sep 2023 11:18:48 +0900 Subject: [PATCH] fix: require credentials in the notes/translate endpoint --- docs/api-change.md | 7 +++++++ .../backend/src/server/api/endpoints/notes/translate.ts | 3 +-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 docs/api-change.md diff --git a/docs/api-change.md b/docs/api-change.md new file mode 100644 index 0000000000..4986481bdb --- /dev/null +++ b/docs/api-change.md @@ -0,0 +1,7 @@ +# Changes to the Firefish API + +## v1.0.5 (unreleased) + +### dev11 + +- `notes/translate` now requires credentials. diff --git a/packages/backend/src/server/api/endpoints/notes/translate.ts b/packages/backend/src/server/api/endpoints/notes/translate.ts index 414e761c1c..1e90fb617e 100644 --- a/packages/backend/src/server/api/endpoints/notes/translate.ts +++ b/packages/backend/src/server/api/endpoints/notes/translate.ts @@ -4,7 +4,6 @@ import config from "@/config/index.js"; import { Converter } from "opencc-js"; import { getAgentByUrl } from "@/misc/fetch.js"; import { fetchMeta } from "@/misc/fetch-meta.js"; -import { Notes } from "@/models/index.js"; import { ApiError } from "../../error.js"; import { getNote } from "../../common/getters.js"; import define from "../../define.js"; @@ -12,7 +11,7 @@ import define from "../../define.js"; export const meta = { tags: ["notes"], - requireCredential: false, + requireCredential: true, requireCredentialPrivateMode: true, res: {