feat: add pinned_at field to account pins
This commit is contained in:
parent
62867f26a9
commit
755aff15da
|
@ -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"`
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue