Skip to content
Snippets Groups Projects
Commit 73867263 authored by Hans Kristian Hoel's avatar Hans Kristian Hoel
Browse files

Fixed auth so that it skips the non existing repositories

parent 5e2be55c
No related branches found
No related tags found
No related merge requests found
......@@ -85,7 +85,8 @@ func HandlerCommits(w http.ResponseWriter, r *http.Request) {
TempCommit, err := strconv.Atoi(resp.Header.Get("X-Total")) // gets total of commits
if err != nil { //check for error
log.Fatal(err)
fmt.Println("Repository do not exist, ID: ", I[i].ID)
TempCommit = 0 // if repository do not exist, sets commit to 0
}
C.Repos[i].Commits = TempCommit // sets commits count in to C.Repos
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment