Update rest.py

Remove returning main snippet