refactor(api): post diffs to use write API

This commit is contained in:
Julian Lam
2021-01-18 13:32:55 -05:00
parent c2e2370655
commit e118e59ce0
8 changed files with 200 additions and 72 deletions

View File

@@ -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 }));
};