refactor: add upload size to account pin response

This commit is contained in:
Derrick Hammer 2024-03-21 12:35:45 -04:00
parent abec1877cd
commit d895d047b3
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
3 changed files with 5 additions and 0 deletions

View File

@ -127,5 +127,6 @@ type AccountPinResponse struct {
type AccountPin struct {
Hash string `json:"hash"`
Size uint64 `json:"size"`
MimeType string `json:"mime_type"`
}

View File

@ -858,6 +858,7 @@ func (s *S5API) accountPins(jc jape.Context) {
}
pins[i] = AccountPin{
Hash: base64Url,
Size: pin.Upload.Size,
MimeType: pin.Upload.MimeType,
}
}

View File

@ -911,10 +911,13 @@ components:
type: object
required:
- hash
- size
- mime_type
properties:
hash:
type: string
size:
type: integer
mime_type:
type: string
RegistryQueryResponse: