mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 17:16:14 +01:00
feat: #8983, update pin tooltip in topic
This commit is contained in:
@@ -37,12 +37,11 @@ Topics.purge = async (req, res) => {
|
||||
};
|
||||
|
||||
Topics.pin = async (req, res) => {
|
||||
await api.topics.pin(req, { tids: [req.params.tid] });
|
||||
|
||||
// Pin expiry was not available w/ sockets hence not included in api lib method
|
||||
if (req.body.expiry) {
|
||||
topics.tools.setPinExpiry(req.params.tid, req.body.expiry, req.uid);
|
||||
await topics.tools.setPinExpiry(req.params.tid, req.body.expiry, req.uid);
|
||||
}
|
||||
await api.topics.pin(req, { tids: [req.params.tid] });
|
||||
|
||||
helpers.formatApiResponse(200, res);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user