servii-backend/modpacks_manager.py
2024-09-26 09:28:05 +02:00

18 lines
439 B
Python

import json
from flask import jsonify, send_from_directory
curseforge_api_key: str = "$2a$10$YRWGp5IY1imlN5HjbnGgJOyvyOtwLotUcut57cuW./PyzqTYMjWN6"
load_modpacks = lambda: json.load(open('servers/modpacks/a-metadata.txt'))
def get_modpacks():
modpacks = load_modpacks()
return jsonify(modpacks)
def get_modpack_image(filename):
return send_from_directory('servers/modpacks', filename)
if __name__ == "__main__":
pass