22 lines
390 B
Python
22 lines
390 B
Python
import json
|
|
|
|
OK = '{"ok":true}'
|
|
|
|
def ok_init(key: str) -> str:
|
|
return json.dumps({
|
|
"ok": True,
|
|
"data": key,
|
|
})
|
|
|
|
def ok_playlist(items: list[str]) -> str:
|
|
return json.dumps({
|
|
"ok": True,
|
|
"data": items,
|
|
})
|
|
|
|
def error_field(field: str) -> str:
|
|
return json.dumps({
|
|
"ok": False,
|
|
"error": "field",
|
|
"data": field,
|
|
})
|