1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-02 07:27:04 +00:00

update get repo info api

add `file_count` and rm `desc`
This commit is contained in:
lian
2017-06-27 16:32:19 +08:00
parent 93dae41ca5
commit 2e5d8bc1ed
3 changed files with 2 additions and 4 deletions

View File

@@ -800,12 +800,12 @@ class Repo(APIView):
"id":repo.id,
"owner":owner,
"name":repo.name,
"desc":repo.desc,
"mtime":repo.latest_modify,
"size":repo.size,
"encrypted":repo.encrypted,
"root":root_id,
"permission": check_permission(repo.id, username),
"file_count": repo.file_count,
}
if repo.encrypted:
repo_json["enc_version"] = repo.enc_version

View File

@@ -21,8 +21,8 @@ class RepoTest(BaseTestCase):
self.assertIsNotNone(json_resp['size'])
self.assertIsNotNone(json_resp['name'])
self.assertIsNotNone(json_resp['root'])
self.assertIsNotNone(json_resp['desc'])
self.assertIsNotNone(json_resp['type'])
self.assertIsNotNone(json_resp['file_count'])
def test_can_delete(self):
self.login_as(self.user)

View File

@@ -50,7 +50,6 @@ class ReposApiTest(ApiTestBase):
self.assertIsNotNone(rinfo['size'])
self.assertIsNotNone(rinfo['name'])
self.assertIsNotNone(rinfo['root'])
self.assertIsNotNone(rinfo['desc'])
self.assertIsNotNone(rinfo['type'])
# elf.assertIsNotNone(rinfo['password_need']) # allow null here
@@ -73,7 +72,6 @@ class ReposApiTest(ApiTestBase):
#self.assertIsNotNone(commit['parent_id']) #allow null
self.assertIsNotNone(commit['new_merge'])
self.assertIsNotNone(commit['repo_id'])
self.assertIsNotNone(commit['desc'])
self.assertIsNotNone(commit['id'])
self.assertIsNotNone(commit['conflict'])
#self.assertIsNotNone(commit['second_parent_id']) #allow null