add some decorators for Flask functions