Fix incorrect error message when changing team members rights

pull/1/head
yflory 2021-04-08 12:05:38 +02:00
parent 4e3a7fef24
commit 3a81e5b75f
1 changed files with 4 additions and 4 deletions

View File

@ -1364,15 +1364,15 @@ define([
// Viewer to editor
if (user.role === "VIEWER" && data.data.role !== "VIEWER") {
changeEditRights(ctx, teamId, user, true, function (err) {
return void cb({error: err});
changeEditRights(ctx, teamId, user, true, function (obj) {
return void cb(obj);
});
}
// Editor to viewer
if (user.role !== "VIEWER" && data.data.role === "VIEWER") {
changeEditRights(ctx, teamId, user, false, function (err) {
return void cb({error: err});
changeEditRights(ctx, teamId, user, false, function (obj) {
return void cb(obj);
});
}