More small fixes
This commit is contained in:
parent
572fcbed6d
commit
f4db481273
|
@ -21,7 +21,7 @@ class ShortURL(Base): # type: ignore[misc, valid-type] # pylint: disable=too-f
|
||||||
shortcode = Column(String(128), unique=True, nullable=False)
|
shortcode = Column(String(128), unique=True, nullable=False)
|
||||||
url = Column(String(2048), unique=False, nullable=False)
|
url = Column(String(2048), unique=False, nullable=False)
|
||||||
fixed_views = Column(Integer, unique=False, nullable=False)
|
fixed_views = Column(Integer, unique=False, nullable=False)
|
||||||
expiry = Column(Integer, unique=False, nullable=False)
|
expiry = Column(String(26), unique=False, nullable=False)
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
|
@ -29,6 +29,7 @@ class ShortcodeDB:
|
||||||
"""
|
"""
|
||||||
Class to represent the database
|
Class to represent the database
|
||||||
"""
|
"""
|
||||||
|
|
||||||
url: str
|
url: str
|
||||||
|
|
||||||
def session(self) -> Session:
|
def session(self) -> Session:
|
||||||
|
|
|
@ -90,7 +90,7 @@ def protect(func: Callable[..., Response]) -> Callable[..., Response]:
|
||||||
return check_ip
|
return check_ip
|
||||||
|
|
||||||
|
|
||||||
@slinky_webapp.route('/<path:path>')
|
@slinky_webapp.route('/<path:path>', strict_slashes=False)
|
||||||
def try_path_as_shortcode(path: str) -> Response:
|
def try_path_as_shortcode(path: str) -> Response:
|
||||||
"""
|
"""
|
||||||
Try the initial path as a shortcode, redirect if found
|
Try the initial path as a shortcode, redirect if found
|
||||||
|
|
Loading…
Reference in a new issue