Finish documentation for all endpoints

+ fix #193 (settings https redirect)
+ fix open api docs on binary
+ fix git error on binary
+ remove flask-restful

hopefully, I didn't break something 😩
This commit is contained in:
mungai-njoroge
2024-03-24 15:57:58 +03:00
committed by Mungai Njoroge
parent 99ec11565c
commit 0af1ae1d8e
22 changed files with 547 additions and 418 deletions
+11 -5
View File
@@ -1,12 +1,18 @@
from flask import Blueprint
from flask_openapi3 import Tag
from flask_openapi3 import APIBlueprint
from app.api.apischemas import AlbumHashSchema
from app.store.albums import AlbumStore as Store
api = Blueprint("colors", __name__, url_prefix="/colors")
bp_tag = Tag(name="Colors", description="Get item colors")
api = APIBlueprint("colors", __name__, url_prefix="/colors", abp_tags=[bp_tag])
@api.route("/album/<albumhash>")
def get_album_color(albumhash: str):
album = Store.get_album_by_hash(albumhash)
@api.get("/album/<albumhash>")
def get_album_color(path: AlbumHashSchema):
"""
Get album color
"""
album = Store.get_album_by_hash(path.albumhash)
msg = {"color": ""}