From 528f213b61571542153b15dec467f3233e226509 Mon Sep 17 00:00:00 2001 From: Kayla Lei Date: Sun, 29 Sep 2024 16:40:12 -0400 Subject: [PATCH] remove default anonymous field in topicsAPIs --- src/api/topics.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/api/topics.js b/src/api/topics.js index 301d5b2738..a3ce4d79bb 100644 --- a/src/api/topics.js +++ b/src/api/topics.js @@ -50,11 +50,10 @@ topicsAPI.get = async function (caller, data) { return topic; }; -topicsAPI.create = async function (caller, data, anonymous = false) { +topicsAPI.create = async function (caller, data) { if (!data) { throw new Error('[[error:invalid-data]]'); } - data.anonymous = anonymous; const payload = { ...data }; payload.tags = payload.tags || []; @@ -84,11 +83,10 @@ topicsAPI.create = async function (caller, data, anonymous = false) { return result.topicData; }; -topicsAPI.reply = async function (caller, data, anonymous = false) { +topicsAPI.reply = async function (caller, data) { if (!data || !data.tid || (meta.config.minimumPostLength !== 0 && !data.content)) { throw new Error('[[error:invalid-data]]'); } - data.anonymous = anonymous; const payload = { ...data }; apiHelpers.setDefaultPostData(caller, payload);