Implemention of slack import feature.
Этот коммит содержится в:
@@ -862,6 +862,22 @@ module.exports.uploadProfileImage = function(imageData, success, error) {
|
||||
});
|
||||
};
|
||||
|
||||
module.exports.importSlack = function(fileData, success, error) {
|
||||
$.ajax({
|
||||
url: "/api/v1/teams/import_team",
|
||||
type: 'POST',
|
||||
data: fileData,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: success,
|
||||
error: function(xhr, status, err) {
|
||||
e = handleError("importTeam", xhr, status, err);
|
||||
error(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
module.exports.getStatuses = function(success, error) {
|
||||
$.ajax({
|
||||
url: "/api/v1/users/status",
|
||||
|
||||
@@ -982,3 +982,12 @@ module.exports.getUserIdFromChannelName = function(channel) {
|
||||
|
||||
return otherUserId;
|
||||
};
|
||||
|
||||
module.exports.importSlack = function(file, success, error) {
|
||||
formData = new FormData();
|
||||
formData.append('file', file, file.name);
|
||||
formData.append('filesize', file.size);
|
||||
formData.append('importFrom', 'slack');
|
||||
|
||||
client.importSlack(formData, success, error);
|
||||
};
|
||||
|
||||
Ссылка в новой задаче
Block a user