@@ -35,7 +35,7 @@ func (d DiggerController) UpdateRepoCache(c *gin.Context) {
35
35
link , err := models .DB .GetGithubAppInstallationLink (installationId )
36
36
if err != nil {
37
37
slog .Error ("Could not get installation link" , "error" , err , "repoFullName" , repoFullName , "installationId" , installationId )
38
- c .String (500 , fmt .Sprintf ("coulnt not find installation link %v %v" , repoFullName , installationId ))
38
+ c .String (http . StatusInternalServerError , fmt .Sprintf ("coulnt not find installation link %v %v" , repoFullName , installationId ))
39
39
return
40
40
}
41
41
orgId := link .OrganisationId
@@ -48,7 +48,7 @@ func (d DiggerController) UpdateRepoCache(c *gin.Context) {
48
48
repo , err := models .DB .GetRepo (orgId , repoDiggerName )
49
49
if err != nil {
50
50
slog .Error ("Could not get repo" , "error" , err , "repoFullName" , repoFullName , "orgId" , orgId )
51
- c .String (500 , fmt .Sprintf ("coulnt not get repository %v %v" , repoFullName , orgId ))
51
+ c .String (http . StatusInternalServerError , fmt .Sprintf ("coulnt not get repository %v %v" , repoFullName , orgId ))
52
52
return
53
53
}
54
54
@@ -58,7 +58,7 @@ func (d DiggerController) UpdateRepoCache(c *gin.Context) {
58
58
_ , token , err := utils .GetGithubService (d .GithubClientProvider , installationId , repoFullName , repoOwner , repoName )
59
59
if err != nil {
60
60
slog .Error ("Could not get GitHub service" , "error" , err , "repoFullName" , repoFullName , "orgId" , orgId )
61
- c .String (500 , fmt .Sprintf ("could not get github service %v %v" , repoFullName , orgId ))
61
+ c .String (http . StatusInternalServerError , fmt .Sprintf ("could not get github service %v %v" , repoFullName , orgId ))
62
62
return
63
63
}
64
64
@@ -90,5 +90,5 @@ func (d DiggerController) UpdateRepoCache(c *gin.Context) {
90
90
slog .Info ("Successfully updated repo cache" , "repoFullName" , repoFullName , "orgId" , orgId )
91
91
}()
92
92
93
- c .String (200 , "successfully submitted cache for processing, check backend logs for progress" )
93
+ c .String (http . StatusOK , "successfully submitted cache for processing, check backend logs for progress" )
94
94
}
0 commit comments