mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 12:33:03 +00:00
fix: folder endpoint returning same track for different files of the same trackhash
+ fix: chunked streaming. return instead of yield chunks
This commit is contained in:
+3
-3
@@ -108,14 +108,14 @@ class PairDeviceQuery(BaseModel):
|
||||
code: str = Field("", description="The code")
|
||||
|
||||
|
||||
@api.post("/pair")
|
||||
@api.get("/pair")
|
||||
@jwt_required(optional=True)
|
||||
def pair_with_code(body: PairDeviceQuery):
|
||||
def pair_with_code(query: PairDeviceQuery):
|
||||
"""
|
||||
Get an access token by sending a pair code. NOTE: A code can only be used once!
|
||||
"""
|
||||
global pair_token
|
||||
token = pair_token.get(body.code, None)
|
||||
token = pair_token.get(query.code, None)
|
||||
|
||||
if token:
|
||||
pair_token = {}
|
||||
|
||||
Reference in New Issue
Block a user