feat: add pinned_at field to account pins
This commit is contained in:
parent
62867f26a9
commit
755aff15da
|
@ -1,6 +1,8 @@
|
||||||
package s5
|
package s5
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"time"
|
||||||
|
|
||||||
"git.lumeweb.com/LumeWeb/libs5-go/encoding"
|
"git.lumeweb.com/LumeWeb/libs5-go/encoding"
|
||||||
"git.lumeweb.com/LumeWeb/libs5-go/types"
|
"git.lumeweb.com/LumeWeb/libs5-go/types"
|
||||||
"git.lumeweb.com/LumeWeb/portal/db/models"
|
"git.lumeweb.com/LumeWeb/portal/db/models"
|
||||||
|
@ -128,5 +130,6 @@ type AccountPinResponse struct {
|
||||||
type AccountPin struct {
|
type AccountPin struct {
|
||||||
Hash string `json:"hash"`
|
Hash string `json:"hash"`
|
||||||
Size uint64 `json:"size"`
|
Size uint64 `json:"size"`
|
||||||
|
PinnedAt time.Time `json:"pinned_at"`
|
||||||
MimeType string `json:"mime_type"`
|
MimeType string `json:"mime_type"`
|
||||||
}
|
}
|
||||||
|
|
|
@ -872,6 +872,7 @@ func (s *S5API) accountPins(jc jape.Context) {
|
||||||
pins[i] = AccountPin{
|
pins[i] = AccountPin{
|
||||||
Hash: base64Url,
|
Hash: base64Url,
|
||||||
Size: pin.Upload.Size,
|
Size: pin.Upload.Size,
|
||||||
|
PinnedAt: pin.CreatedAt,
|
||||||
MimeType: pin.Upload.MimeType,
|
MimeType: pin.Upload.MimeType,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -912,12 +912,15 @@ components:
|
||||||
required:
|
required:
|
||||||
- hash
|
- hash
|
||||||
- size
|
- size
|
||||||
|
- pinned_at
|
||||||
- mime_type
|
- mime_type
|
||||||
properties:
|
properties:
|
||||||
hash:
|
hash:
|
||||||
type: string
|
type: string
|
||||||
size:
|
size:
|
||||||
type: integer
|
type: integer
|
||||||
|
pinned_at:
|
||||||
|
type: string
|
||||||
mime_type:
|
mime_type:
|
||||||
type: string
|
type: string
|
||||||
RegistryQueryResponse:
|
RegistryQueryResponse:
|
||||||
|
|
Loading…
Reference in New Issue