Skip to content

Commit

Permalink
refactor route decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
letroot authored Jul 17, 2016
1 parent af603c0 commit d983436
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions chapeau.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,8 @@ def user_leta(request, client):
chapeau.render(client, '/path/to/file', *args, **kwargs)
'''
def route_decorator(func):
@wraps(func)
def wrapper(*args, **kwargs):
add_route(path, func)
return func(*args, **kwargs)
return wrapper
add_route(path, func)
return func(*args, **kwargs)
return route_decorator

## Example usage of the route decorator
Expand Down

0 comments on commit d983436

Please sign in to comment.