Add comment and nil check (better save than sorry)

This commit is contained in:
Till Faelligen 2022-05-02 09:53:24 +02:00
parent eb7e81ca4f
commit 3e81bc68b7

View file

@ -74,7 +74,8 @@ func Setup(
return *r
}
respondSize := cfg.MaxFileSizeBytes
if *cfg.MaxFileSizeBytes == 0 {
// Shouldn't be nil, as this is checked at startup.
if cfg.MaxFileSizeBytes != nil && *cfg.MaxFileSizeBytes == 0 {
respondSize = nil
}
return util.JSONResponse{