Compare commits
3 Commits
4dec430c69
...
a289828c6f
Author | SHA1 | Date |
---|---|---|
Derrick Hammer | a289828c6f | |
Derrick Hammer | d895d047b3 | |
Derrick Hammer | abec1877cd |
|
@ -127,5 +127,6 @@ type AccountPinResponse struct {
|
||||||
|
|
||||||
type AccountPin struct {
|
type AccountPin struct {
|
||||||
Hash string `json:"hash"`
|
Hash string `json:"hash"`
|
||||||
|
Size uint64 `json:"size"`
|
||||||
MimeType string `json:"mime_type"`
|
MimeType string `json:"mime_type"`
|
||||||
}
|
}
|
||||||
|
|
|
@ -197,7 +197,9 @@ func (s *S5API) Routes() (*httprouter.Router, error) {
|
||||||
"GET /s5/account": middleware.ApplyMiddlewares(s.accountInfo, middleware.ProxyMiddleware, authMw),
|
"GET /s5/account": middleware.ApplyMiddlewares(s.accountInfo, middleware.ProxyMiddleware, authMw),
|
||||||
"GET /s5/account/stats": middleware.ApplyMiddlewares(s.accountStats, middleware.ProxyMiddleware, authMw),
|
"GET /s5/account/stats": middleware.ApplyMiddlewares(s.accountStats, middleware.ProxyMiddleware, authMw),
|
||||||
"GET /s5/account/pins.bin": middleware.ApplyMiddlewares(s.accountPinsBinary, middleware.ProxyMiddleware, authMw),
|
"GET /s5/account/pins.bin": middleware.ApplyMiddlewares(s.accountPinsBinary, middleware.ProxyMiddleware, authMw),
|
||||||
"GET /s5/account/pins": middleware.ApplyMiddlewares(s.accountPins, middleware.ProxyMiddleware, authMw),
|
"GET /s5/account/pins": middleware.ApplyMiddlewares(s.accountPins, middleware.ProxyMiddleware, defaultCors.Handler, authMw),
|
||||||
|
|
||||||
|
"OPTIONS /s5/account/pins": middleware.ApplyMiddlewares(corsOptionsHandler, middleware.ProxyMiddleware, defaultCors.Handler, authMw),
|
||||||
|
|
||||||
// Upload API
|
// Upload API
|
||||||
"POST /s5/upload": middleware.ApplyMiddlewares(s.smallFileUpload, middleware.ProxyMiddleware, defaultCors.Handler, authMw),
|
"POST /s5/upload": middleware.ApplyMiddlewares(s.smallFileUpload, middleware.ProxyMiddleware, defaultCors.Handler, authMw),
|
||||||
|
@ -858,6 +860,7 @@ func (s *S5API) accountPins(jc jape.Context) {
|
||||||
}
|
}
|
||||||
pins[i] = AccountPin{
|
pins[i] = AccountPin{
|
||||||
Hash: base64Url,
|
Hash: base64Url,
|
||||||
|
Size: pin.Upload.Size,
|
||||||
MimeType: pin.Upload.MimeType,
|
MimeType: pin.Upload.MimeType,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -909,9 +909,15 @@ components:
|
||||||
$ref: '#/components/schemas/AccountPin'
|
$ref: '#/components/schemas/AccountPin'
|
||||||
AccountPin:
|
AccountPin:
|
||||||
type: object
|
type: object
|
||||||
|
required:
|
||||||
|
- hash
|
||||||
|
- size
|
||||||
|
- mime_type
|
||||||
properties:
|
properties:
|
||||||
hash:
|
hash:
|
||||||
type: string
|
type: string
|
||||||
|
size:
|
||||||
|
type: integer
|
||||||
mime_type:
|
mime_type:
|
||||||
type: string
|
type: string
|
||||||
RegistryQueryResponse:
|
RegistryQueryResponse:
|
||||||
|
|
Loading…
Reference in New Issue