Merge and add tag descriptions for the latest image
This commit is contained in:
commit
2e476625de
4 changed files with 44 additions and 11 deletions
|
@ -85,15 +85,15 @@ def get_repo_api(namespace, repository):
|
|||
}
|
||||
|
||||
def repo_view(repository, tags = []):
|
||||
tag_list = []
|
||||
tag_dict = {}
|
||||
for tag in tags:
|
||||
tag_list.append(tag_view(tag))
|
||||
tag_dict[tag.name] = tag_view(tag)
|
||||
|
||||
return {
|
||||
'namespace': repository.namespace,
|
||||
'name': repository.name,
|
||||
'description': repository.description,
|
||||
'tags': tag_list,
|
||||
'tags': tag_dict,
|
||||
'can_write': ModifyRepositoryPermission(repository.namespace, repository.name).can()
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue