feat: added PUT /api/v1/users/:uid/password route

This commit is contained in:
Julian Lam
2020-03-31 19:26:03 -04:00
parent af2e424ffe
commit 7aed174ebc
5 changed files with 73 additions and 47 deletions

View File

@@ -78,6 +78,8 @@ module.exports = function (SocketUser) {
}
SocketUser.changePassword = async function (socket, data) {
sockets.warnDeprecated(socket, 'PUT /api/v1/users/:uid/password');
if (!socket.uid) {
throw new Error('[[error:invalid-uid]]');
}