Skip to content

Commit

Permalink
Merge pull request #58 from Thorfusion/dev
Browse files Browse the repository at this point in the history
fix docker image
  • Loading branch information
maggi373 authored May 26, 2024
2 parents ec1ea50 + 24766e4 commit 26018d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 26 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM python:3.10-alpine

WORKDIR /app
COPY /models/ /app/
COPY /static/ /app/
COPY /templates/ /app/
COPY /models/ /app/models/
COPY /static/ /app/static/
COPY /templates/ /app/templates/
COPY /api.py /app/
COPY /app.py /app/
COPY /LICENSE.md /app/
Expand Down
24 changes: 1 addition & 23 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,36 +158,14 @@ def modversion(id):
return redirect(url_for("login"))

mod = Mod.get_by_id(id)
name = ""
size = ""
# if request.method == "POST":
# # make check later (check if modid exists in database)
# modver = request.form["modver"]
# jarfile = request.files["jarfile"]

# if modver != "" and jarfile != "":
# jarfile.save(secure_filename(jarfile.filename))
# size = len(jarfile.read())
# name = jarfile.filename.strip(".jar")
# # createFolder("/mods")
# createFolder("mods/" + modSlug)
# # zipObj = ZipFile(mod.slug+"-"+modver, 'w')

# # zipObj.write(jarfile.read())
# # zipObj.close()

# # add_modversion_db(id,modver,hash,size)

# else:
# print("error")

try:
modversions = mod.get_versions()
except connector.ProgrammingError as e:
Database.create_tables()
modversions = []

return render_template("modversion.html", modSlug=mod.name, name=name, size=size, modversions=modversions, mod=mod, mirror_url=mirror_url)
return render_template("modversion.html", modSlug=mod.name, modversions=modversions, mod=mod, mirror_url=mirror_url)

@app.route("/modversion/<id>", methods=["POST"])
def newmodversion(id):
Expand Down

0 comments on commit 26018d0

Please sign in to comment.