forked from Lesin/reposync
返回数据总条数
This commit is contained in:
parent
2f714b9800
commit
21e7b680ec
|
@ -100,6 +100,7 @@ class SyncDirection(Controller):
|
|||
)
|
||||
return SYNCResponse(
|
||||
code_status=Status.SUCCESS.code,
|
||||
total=len(repos),
|
||||
data=repos,
|
||||
msg=Status.SUCCESS.msg
|
||||
)
|
||||
|
@ -130,6 +131,7 @@ class SyncDirection(Controller):
|
|||
|
||||
return SYNCResponse(
|
||||
code_status=Status.SUCCESS.code,
|
||||
total=len(branches),
|
||||
data=branches,
|
||||
msg=Status.SUCCESS.msg
|
||||
)
|
||||
|
@ -281,6 +283,7 @@ class SyncDirection(Controller):
|
|||
)
|
||||
return SYNCResponse(
|
||||
code_status=Status.SUCCESS.code,
|
||||
total=len(data),
|
||||
data=data,
|
||||
msg=Status.SUCCESS.msg
|
||||
)
|
||||
|
|
|
@ -77,6 +77,7 @@ class SYNCException(Exception):
|
|||
class SYNCResponse(BaseModel):
|
||||
code_status: Optional[int] = 0
|
||||
data: Optional[Data] = None
|
||||
total: Optional[int] = None
|
||||
msg: Optional[str] = ''
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue