Merge pull request #244 from barrust/route-isclass-fix

fix for route.is_class_based
This commit is contained in:
2018-12-12 03:58:41 -05:00
committed by GitHub
2 changed files with 4 additions and 1 deletions
+2
View File
@@ -316,6 +316,8 @@ class API:
params = route.incoming_matches(req.url.path)
cont = True
if route.is_function:
try:
try:
+2 -1
View File
@@ -1,5 +1,6 @@
import re
import functools
import inspect
from parse import parse
@@ -59,7 +60,7 @@ class Route:
@property
def is_class_based(self):
return hasattr(self.endpoint, "__class__")
return inspect.isclass(self.endpoint)
@property
def is_function(self):