Compare commits
No commits in common. "b77bebe3b1a03cecdd7e80f575452d5ce91ccfac" and "9b82fa7828946803289add03fc84be1dc4f86d8b" have entirely different histories.
b77bebe3b1
...
9b82fa7828
|
@ -156,10 +156,6 @@ func (f *FilesController) PostPinBy(cidString string) {
|
||||||
f.Ctx.StatusCode(iris.StatusCreated)
|
f.Ctx.StatusCode(iris.StatusCreated)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *FilesController) GetUploadLimit() {
|
|
||||||
f.respondJSON(&response.UploadLimit{Limit: f.Ctx.Application().ConfigurationReadOnly().GetPostMaxMemory()})
|
|
||||||
}
|
|
||||||
|
|
||||||
func validateCid(cidString string, validateStatus bool, ctx iris.Context) (string, bool) {
|
func validateCid(cidString string, validateStatus bool, ctx iris.Context) (string, bool) {
|
||||||
_, err := cid.Valid(cidString)
|
_, err := cid.Valid(cidString)
|
||||||
if sendError(ctx, err, iris.StatusBadRequest) {
|
if sendError(ctx, err, iris.StatusBadRequest) {
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
package response
|
|
||||||
|
|
||||||
type UploadLimit struct {
|
|
||||||
Limit int64 `json:"limit"`
|
|
||||||
}
|
|
|
@ -254,7 +254,7 @@ func VerifyLoginToken(token string) (*model.Account, error) {
|
||||||
return nil, ErrInvalidToken
|
return nil, ErrInvalidToken
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = jwt.Verify(jwt.EdDSA, jwtKey, []byte(token), blocklist)
|
_, err = jwt.Verify(jwt.HS256, jwtKey, []byte(token), blocklist)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
db.Get().Delete(&session)
|
db.Get().Delete(&session)
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
Loading…
Reference in New Issue