mirror of
https://github.com/FAUSheppy/tmnf-replay-server.git
synced 2025-12-06 07:01:37 +01:00
remove: trusted uploader concept
This commit is contained in:
@@ -202,10 +202,9 @@ def replay_from_path(fullpath, uploader=None):
|
|||||||
upload_dt=datetime.datetime.now().isoformat(),
|
upload_dt=datetime.datetime.now().isoformat(),
|
||||||
cp_times=",".join(map(str, ghost.cp_times)))
|
cp_times=",".join(map(str, ghost.cp_times)))
|
||||||
|
|
||||||
if uploader in app.config["TRUSTED_UPLOADERS"]:
|
m = Map(map_uid=replay.map_uid, mapname=replay.guess_map())
|
||||||
m = Map(map_uid=replay.map_uid, mapname=replay.guess_map())
|
db.session.merge(m)
|
||||||
db.session.merge(m)
|
db.session.commit()
|
||||||
db.session.commit()
|
|
||||||
|
|
||||||
return replay
|
return replay
|
||||||
|
|
||||||
@@ -265,7 +264,6 @@ def upload():
|
|||||||
return flask.render_template("upload.html")
|
return flask.render_template("upload.html")
|
||||||
|
|
||||||
def create_app():
|
def create_app():
|
||||||
app.config["TRUSTED_UPLOADERS"] = ["sheppy"]
|
|
||||||
db.create_all()
|
db.create_all()
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
Reference in New Issue
Block a user