def delete_superadmin(email): super_admin = SuperAdminService.get_by_email(email) if not super_admin: print('Super admin not found!') return if prompt_bool('Do you really want to delete this account? [y/n]'): SuperAdminService.delete(super_admin.id) print('Success!')
def list_superadmin(): superadmins = map(SuperAdminService.to_dict, SuperAdminService.list()) for superadmin in superadmins: print(superadmin['email'])
def super_admin(app, perm): return SuperAdminService.create('*****@*****.**', 'test')