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

@@ -158,7 +158,7 @@ SocketUser.isFollowing = async function (socket, data) {
};
SocketUser.follow = async function (socket, data) {
sockets.warnDeprecated(socket, 'POST /api/v1/users/follow');
sockets.warnDeprecated(socket, 'POST /api/v3/users/follow');
if (!socket.uid || !data) {
throw new Error('[[error:invalid-data]]');
@@ -182,7 +182,7 @@ SocketUser.follow = async function (socket, data) {
};
SocketUser.unfollow = async function (socket, data) {
sockets.warnDeprecated(socket, 'DELETE /api/v1/users/unfollow');
sockets.warnDeprecated(socket, 'DELETE /api/v3/users/unfollow');
if (!socket.uid || !data) {
throw new Error('[[error:invalid-data]]');