ability to delete uploads from account page #6431

This commit is contained in:
Barış Soner Uşaklı
2018-04-09 20:03:33 -04:00
parent 8e822c7772
commit b35bfb81ce
6 changed files with 71 additions and 4 deletions

View File

@@ -341,6 +341,13 @@ SocketUser.setModerationNote = function (socket, data, callback) {
], callback);
};
SocketUser.deleteUpload = function (socket, url, callback) {
if (!url) {
return callback(new Error('[[error:invalid-data]]'));
}
user.deleteUpload(socket.uid, url, callback);
};
SocketUser.gdpr = {};
SocketUser.gdpr.consent = function (socket, data, callback) {