refactor(api): post move to write API

This commit is contained in:
Julian Lam
2021-01-18 15:31:14 -05:00
parent 0fa4c11ea6
commit 966c4117ec
9 changed files with 93 additions and 43 deletions

View File

@@ -46,7 +46,7 @@ Assert.topic = helpers.try(async (req, res, next) => {
Assert.post = helpers.try(async (req, res, next) => {
if (!await posts.exists(req.params.pid)) {
return controllerHelpers.formatApiResponse(404, res, new Error('[[error:no-topic]]'));
return controllerHelpers.formatApiResponse(404, res, new Error('[[error:no-post]]'));
}
next();