mirror of
https://github.com/Forceu/Gokapi.git
synced 2026-04-25 07:59:20 -05:00
Minor refactoring and adding of comments
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user