summaryrefslogtreecommitdiff
path: root/swiftstory/status.py
diff options
context:
space:
mode:
Diffstat (limited to 'swiftstory/status.py')
-rw-r--r--swiftstory/status.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/swiftstory/status.py b/swiftstory/status.py
index fb8347b..d794580 100644
--- a/swiftstory/status.py
+++ b/swiftstory/status.py
@@ -1,8 +1,9 @@
+from typing import Any
import json
-def error(msg, code=255):
+def error(msg: str, code: int = 255) -> str:
return json.dumps({'type': 'response', 'content': {'status': code, 'info': msg}})
-def success(obj):
+def success(obj: Any) -> str:
return json.dumps({'type': 'response', 'content': {'status': 0, 'result': obj}})