mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-06 12:31:33 +01:00
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:
committed by
Barış Soner Uşaklı
parent
b0679cadcf
commit
00b9ca111e
@@ -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);
|
||||
};
|
||||
Reference in New Issue
Block a user