forked from tangled.org/core
this repo has no description

Compare changes

Choose any two refs to compare.

Changed files
+19 -13
appview
knotserver
+8 -4
appview/db/issues.go
··· 359 359 repoMap[string(repos[i].RepoAt())] = &repos[i] 360 360 } 361 361 362 - for issueAt := range issueMap { 363 - i := issueMap[issueAt] 364 - r := repoMap[string(i.RepoAt)] 365 - i.Repo = r 362 + for issueAt, i := range issueMap { 363 + if r, ok := repoMap[string(i.RepoAt)]; ok { 364 + i.Repo = r 365 + } else { 366 + // do not show up the issue if the repo is deleted 367 + // TODO: foreign key where? 368 + delete(issueMap, issueAt) 369 + } 366 370 } 367 371 368 372 // collect comments
+2 -2
appview/db/profile.go
··· 553 553 query = `select count(id) from pulls where owner_did = ? and state = ?` 554 554 args = append(args, did, PullOpen) 555 555 case VanityStatOpenIssueCount: 556 - query = `select count(id) from issues where owner_did = ? and open = 1` 556 + query = `select count(id) from issues where did = ? and open = 1` 557 557 args = append(args, did) 558 558 case VanityStatClosedIssueCount: 559 - query = `select count(id) from issues where owner_did = ? and open = 0` 559 + query = `select count(id) from issues where did = ? and open = 0` 560 560 args = append(args, did) 561 561 case VanityStatRepositoryCount: 562 562 query = `select count(id) from repos where did = ?`
-1
appview/state/profile.go
··· 17 17 "github.com/gorilla/feeds" 18 18 "tangled.sh/tangled.sh/core/api/tangled" 19 19 "tangled.sh/tangled.sh/core/appview/db" 20 - // "tangled.sh/tangled.sh/core/appview/oauth" 21 20 "tangled.sh/tangled.sh/core/appview/pages" 22 21 ) 23 22
+1
knotserver/xrpc/repo_blob.go
··· 69 69 return 70 70 } 71 71 w.Header().Set("ETag", eTag) 72 + w.Header().Set("Content-Type", mimeType) 72 73 73 74 case strings.HasPrefix(mimeType, "text/"): 74 75 w.Header().Set("Cache-Control", "public, no-cache")
+8 -6
knotserver/xrpc/repo_branches.go
··· 20 20 21 21 cursor := r.URL.Query().Get("cursor") 22 22 23 - limit := 50 // default 24 - if limitStr := r.URL.Query().Get("limit"); limitStr != "" { 25 - if l, err := strconv.Atoi(limitStr); err == nil && l > 0 && l <= 100 { 26 - limit = l 27 - } 28 - } 23 + // limit := 50 // default 24 + // if limitStr := r.URL.Query().Get("limit"); limitStr != "" { 25 + // if l, err := strconv.Atoi(limitStr); err == nil && l > 0 && l <= 100 { 26 + // limit = l 27 + // } 28 + // } 29 + 30 + limit := 500 29 31 30 32 gr, err := git.PlainOpen(repoPath) 31 33 if err != nil {