mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-08-05 19:20:38 +02:00
breaking: remove socket.emit('user.changePicture')
This commit is contained in:
@@ -3,19 +3,7 @@
|
||||
const user = require('../../user');
|
||||
const plugins = require('../../plugins');
|
||||
|
||||
const websockets = require('../index');
|
||||
const api = require('../../api');
|
||||
|
||||
module.exports = function (SocketUser) {
|
||||
SocketUser.changePicture = async function (socket, data) {
|
||||
if (!socket.uid) {
|
||||
throw new Error('[[error:invalid-uid]]');
|
||||
}
|
||||
|
||||
websockets.warnDeprecated(socket, 'PUT /api/v3/users/:uid/picture');
|
||||
await api.users.changePicture(socket, data);
|
||||
};
|
||||
|
||||
SocketUser.removeUploadedPicture = async function (socket, data) {
|
||||
if (!socket.uid || !data || !data.uid) {
|
||||
throw new Error('[[error:invalid-data]]');
|
||||
|
||||
Reference in New Issue
Block a user