mirror of
https://github.com/JefferyHcool/BiliNote.git
synced 2026-08-28 19:46:57 +08:00
first commit
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
from app.utils.status_code import StatusCode
|
||||
|
||||
class ResponseWrapper:
|
||||
@staticmethod
|
||||
def success(data=None, msg="success", code=StatusCode.SUCCESS):
|
||||
return {
|
||||
"code": int(code),
|
||||
"msg": msg,
|
||||
"data": data
|
||||
}
|
||||
|
||||
@staticmethod
|
||||
def error(msg="error", code=StatusCode.FAIL, data=None):
|
||||
return {
|
||||
"code": int(code),
|
||||
"msg": msg,
|
||||
"data": data
|
||||
}
|
||||
Reference in New Issue
Block a user