feat: add pinned_at field to account pins

This commit is contained in:
Derrick Hammer 2024-03-21 16:28:48 -04:00
parent 62867f26a9
commit 755aff15da
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
3 changed files with 10 additions and 3 deletions

View File

@ -1,6 +1,8 @@
package s5
import (
"time"
"git.lumeweb.com/LumeWeb/libs5-go/encoding"
"git.lumeweb.com/LumeWeb/libs5-go/types"
"git.lumeweb.com/LumeWeb/portal/db/models"
@ -128,5 +130,6 @@ type AccountPinResponse struct {
type AccountPin struct {
Hash string `json:"hash"`
Size uint64 `json:"size"`
PinnedAt time.Time `json:"pinned_at"`
MimeType string `json:"mime_type"`
}

View File

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

View File

@ -912,12 +912,15 @@ components:
required:
- hash
- size
- pinned_at
- mime_type
properties:
hash:
type: string
size:
type: integer
pinned_at:
type: string
mime_type:
type: string
RegistryQueryResponse: