21 lines
628 B
Python
21 lines
628 B
Python
from tools import *
|
|
from Utils.Config import *
|
|
from Utils.Lib import *
|
|
|
|
|
|
Links=flask.Blueprint("Links", __name__, subdomain="go")
|
|
|
|
@Links.route("/")
|
|
def LinksIndex():
|
|
return flask.redirect("https://www.gvsds.com")
|
|
|
|
@Links.route("/relink/")
|
|
def LinksFWLink():
|
|
LinkID = flask.request.args.get("LinkID", None)
|
|
try:
|
|
LinkID = int(LinkID)
|
|
except:
|
|
return flask.redirect("https://www.gvsds.com")
|
|
if not LinkID or not (LinkAddres := Link.query.filter(Link.LinkID == LinkID).first()):
|
|
return flask.redirect("https://www.gvsds.com")
|
|
return flask.redirect(LinkAddres.Link) |