User cannot change their own role

This commit is contained in:
narendra chandra 2021-02-06 17:45:21 -05:00
parent ce23692922
commit c39e7224dc

View File

@ -198,17 +198,16 @@ export default {
} }
}, },
changeUserRole(id, event) { changeUserRole(id, event) {
const newRole = event.target.value; const newRole = event.target.value
this.$apollo this.$apollo
.mutate({ .mutate({
mutation: updateUserRole(newRole, id), mutation: updateUserRole(newRole, id),
variables: { role: newRole, id} variables: { role: newRole, id },
}) })
.catch((error) => { .catch((error) => {
console.log(error.message); console.log(error.message)
this.$toast.error(error.message) this.$toast.error(error.message)
} })
)
}, },
}, },
} }