feat: faker data: identification

This commit is contained in:
Zhaolong
2022-01-25 18:28:56 +08:00
parent 1c24034d59
commit 3be9b86fff
8 changed files with 451 additions and 7 deletions

View File

18
utils/response.py Normal file
View File

@@ -0,0 +1,18 @@
from __future__ import annotations
def response(resp: dict, status: int, headers=None):
return resp, status, headers
def success(code: int, msg: str, data: object):
resp = {
"code": code,
"msg": msg,
"data": data
}
return response(resp, 200)
def succ(data: object):
return success(200, 'success', data)