mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-29 18:16:17 +01:00
feat(api): #9123, migrate /api/post/pid/:pid to Write API
This commit is contained in:
@@ -8,6 +8,10 @@ const apiHelpers = require('../../api/helpers');
|
||||
|
||||
const Posts = module.exports;
|
||||
|
||||
Posts.get = async (req, res) => {
|
||||
helpers.formatApiResponse(200, res, await api.posts.get(req, { pid: req.params.pid }));
|
||||
};
|
||||
|
||||
Posts.edit = async (req, res) => {
|
||||
const editResult = await api.posts.edit(req, {
|
||||
...req.body,
|
||||
|
||||
Reference in New Issue
Block a user