Change owner rest route (#13881)

* fix: dont use sass-embedded on freebsd, #13867

* fix: #13715, dont reduce hardcap if usersPerPage is < 50

* fix: closes #13872, use translator.compile for notification text

so commas don't cause issues

* fix: remove bidiControls from notification.bodyShort

* refactor: move change owner call to rest api

deprecate socket method

* fix spec

* test: one more fix

* test: add 404

* test: fix tests :rage1:

* test: update test to use new method
This commit is contained in:
Barış Uşaklı
2026-01-11 14:38:14 -05:00
committed by Barış Soner Uşaklı
parent b0679cadcf
commit 00b9ca111e
9 changed files with 125 additions and 25 deletions

View File

@@ -209,4 +209,12 @@ Posts.notifyQueuedPostOwner = async (req, res) => {
const { id } = req.params;
await api.posts.notifyQueuedPostOwner(req, { id, message: req.body.message });
helpers.formatApiResponse(200, res);
};
Posts.changeOwner = async (req, res) => {
await api.posts.changeOwner(req, {
pids: req.body.pids || (req.params.pid ? [req.params.pid] : []),
uid: req.body.uid,
});
helpers.formatApiResponse(200, res);
};