refactor(writeapi): update route prefix to api/v3, default error option

This commit is contained in:
Julian Lam
2020-10-07 11:14:37 -04:00
parent f67824719c
commit 3ea1aa4780
29 changed files with 70 additions and 68 deletions

View File

@@ -24,7 +24,7 @@ require('./posts/tools')(SocketPosts);
require('./posts/diffs')(SocketPosts);
SocketPosts.reply = async function (socket, data) {
sockets.warnDeprecated(socket, 'POST /api/v1/topics/:tid');
sockets.warnDeprecated(socket, 'POST /api/v3/topics/:tid');
if (!data || !data.tid || (meta.config.minimumPostLength !== 0 && !data.content)) {
throw new Error('[[error:invalid-data]]');