Minor refactoring and adding of comments

This commit is contained in:
Marc Ole Bulling
2025-05-25 17:07:06 +02:00
parent 6d68134240
commit 20ee8cbfa4
10 changed files with 85 additions and 53 deletions
+1 -3
View File
@@ -373,10 +373,8 @@ func apiChunkComplete(w http.ResponseWriter, r requestParser, user models.User)
go doBlockingPartCompleteChunk(nil, request, user)
_, _ = io.WriteString(w, "{\"result\":\"OK\"}")
return
} else {
doBlockingPartCompleteChunk(w, request, user)
}
doBlockingPartCompleteChunk(w, request, user)
}
func doBlockingPartCompleteChunk(w http.ResponseWriter, request *paramChunkComplete, user models.User) {
+2 -2
View File
@@ -824,7 +824,7 @@ func getApiPermMap(t *testing.T) map[models.ApiPermission]string {
result[models.ApiPermManageLogs] = "PERM_MANAGE_LOGS"
sum := 0
for perm, _ := range result {
for perm := range result {
sum = sum + int(perm)
}
if sum != int(models.ApiPermAll) {
@@ -846,7 +846,7 @@ func getUserPermMap(t *testing.T) map[models.UserPermission]string {
result[models.UserPermManageUsers] = "PERM_USERS"
sum := 0
for perm, _ := range result {
for perm := range result {
sum = sum + int(perm)
}
if sum != int(models.UserPermissionAll) {