code: def delete(self, roleId):
          
          role = db.Role.find_one(Role.role_id == roleId)
          if not role:
              return self.make_response('No such role found', HTTP.NOT_FOUND)
  
          if role.name in ('User', 'Admin'):
              return self.make_response('Cannot delete the built-in roles', HTTP.BAD_REQUEST)
  
          db.session.delete(role)
          db.session.commit()
          auditlog(event='role.delete', actor=session['user'].username, data={'roleId': roleId})
  
          return self.make_response({
              'message': 'Role has been deleted',
              'roleId': roleId
          })
docs: Delete a user role