mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 21:17:58 +08:00
fix(proto): the size of the repo should be int64, since that is the same type used for the manifest/config/index/digest sizes it sums up. (#2120)
Using int32 may result in negative size values when returned by the graphql API Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
This commit is contained in:
@@ -445,7 +445,7 @@ func GetRepoMeta(protoRepoMeta *proto_go.RepoMeta) mTypes.RepoMeta {
|
||||
Name: protoRepoMeta.Name,
|
||||
Tags: GetTags(protoRepoMeta.Tags),
|
||||
Rank: int(protoRepoMeta.Rank),
|
||||
Size: int64(protoRepoMeta.Size),
|
||||
Size: protoRepoMeta.Size,
|
||||
Platforms: GetPlatforms(protoRepoMeta.Platforms),
|
||||
Vendors: protoRepoMeta.Vendors,
|
||||
IsStarred: protoRepoMeta.IsStarred,
|
||||
|
||||
@@ -19,7 +19,7 @@ func GetProtoRepoMeta(repo mTypes.RepoMeta) *proto_go.RepoMeta {
|
||||
Statistics: GetProtoStatistics(repo.Statistics),
|
||||
Signatures: GetProtoSignatures(repo.Signatures),
|
||||
Referrers: GetProtoReferrers(repo.Referrers),
|
||||
Size: int32(repo.Size),
|
||||
Size: repo.Size,
|
||||
Vendors: repo.Vendors,
|
||||
Platforms: GetProtoPlatforms(repo.Platforms),
|
||||
LastUpdatedImage: GetProtoLastUpdatedImage(repo.LastUpdatedImage),
|
||||
|
||||
Reference in New Issue
Block a user