mirror of
https://github.com/Radiquum/YAMPD.git
synced 2025-05-20 15:49:34 +05:00
feat: add curseForge mod
This commit is contained in:
parent
01cef9a6ea
commit
c2295f8e29
2 changed files with 91 additions and 1 deletions
|
@ -7,7 +7,7 @@ from PIL import Image
|
|||
from io import BytesIO
|
||||
import base64
|
||||
import json
|
||||
from .source import Modrinth
|
||||
from .source import Modrinth, CurseForge
|
||||
|
||||
|
||||
@apiPack.route("/<id>", methods=["GET"])
|
||||
|
@ -89,6 +89,8 @@ def addMod(id):
|
|||
|
||||
if source == "Modrinth":
|
||||
mod = Modrinth.getModrinthMod(slug, version, mod_loader, game_version)
|
||||
elif source == "CurseForge":
|
||||
mod = CurseForge.getCurseForgeMod(slug, version, mod_loader, game_version)
|
||||
|
||||
if mod.get("status") != "ok":
|
||||
return jsonify({"status": "error", "message": mod.get("message")})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue