update code for ban and role api