mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-29 18:16:17 +01:00
refactor(api): post diffs to use write API
This commit is contained in:
@@ -73,3 +73,16 @@ Posts.unbookmark = async (req, res) => {
|
||||
await api.posts.unbookmark(req, data);
|
||||
helpers.formatApiResponse(200, res);
|
||||
};
|
||||
|
||||
Posts.getDiffs = async (req, res) => {
|
||||
helpers.formatApiResponse(200, res, await api.posts.getDiffs(req, { ...req.params }));
|
||||
};
|
||||
|
||||
Posts.loadDiff = async (req, res) => {
|
||||
helpers.formatApiResponse(200, res, await api.posts.loadDiff(req, { ...req.params }));
|
||||
};
|
||||
|
||||
Posts.restoreDiff = async (req, res) => {
|
||||
helpers.formatApiResponse(200, res, await api.posts.restoreDiff(req, { ...req.params }));
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user