feat: default settings api (#716)

* feat: default settings api

* fix logic bug

* chore
This commit is contained in:
j2rong4cn
2025-07-14 23:41:34 +08:00
committed by GitHub
parent 750d4eb3f6
commit 2a4c546a8b
5 changed files with 95 additions and 45 deletions

View File

@ -73,7 +73,7 @@ func attachHeader(w http.ResponseWriter, file model.Obj, header http.Header) {
func GetEtag(file model.Obj) string {
hash := ""
for _, v := range file.GetHash().Export() {
if strings.Compare(v, hash) > 0 {
if v > hash {
hash = v
}
}