@@ -316,7 +316,7 @@ func branchNamesHandler(w http.ResponseWriter, r *http.Request) {
316316
317317 // Make sure the database exists in the system
318318 exists , err := com .CheckDBPermissions (loggedInUser , dbOwner , dbName , false )
319- if err != err {
319+ if err != nil {
320320 w .WriteHeader (http .StatusInternalServerError )
321321 fmt .Fprint (w , err .Error ())
322322 return
@@ -1443,7 +1443,7 @@ func deleteBranchHandler(w http.ResponseWriter, r *http.Request) {
14431443
14441444 // Make sure the database exists in the system
14451445 exists , err := com .CheckDBPermissions (loggedInUser , dbOwner , dbName , true )
1446- if err != err {
1446+ if err != nil {
14471447 w .WriteHeader (http .StatusInternalServerError )
14481448 return
14491449 }
@@ -1941,7 +1941,7 @@ func deleteCommitHandler(w http.ResponseWriter, r *http.Request) {
19411941
19421942 // Make sure the database exists in the system
19431943 exists , err := com .CheckDBPermissions (loggedInUser , dbOwner , dbName , true )
1944- if err != err {
1944+ if err != nil {
19451945 w .WriteHeader (http .StatusInternalServerError )
19461946 return
19471947 }
@@ -2114,7 +2114,7 @@ func deleteDataHandler(w http.ResponseWriter, r *http.Request) {
21142114
21152115 // Make sure the database exists in the system, and the user has write access to it
21162116 exists , err := com .CheckDBPermissions (loggedInUser , dbOwner , dbName , true )
2117- if err != err {
2117+ if err != nil {
21182118 w .WriteHeader (http .StatusInternalServerError )
21192119 return
21202120 }
@@ -2225,7 +2225,7 @@ func deleteDatabaseHandler(w http.ResponseWriter, r *http.Request) {
22252225
22262226 // Make sure the database exists in the system
22272227 exists , err := com .CheckDBPermissions (loggedInUser , dbOwner , dbName , true )
2228- if err != err {
2228+ if err != nil {
22292229 w .WriteHeader (http .StatusInternalServerError )
22302230 fmt .Fprint (w , "Internal server error" )
22312231 return
@@ -2300,7 +2300,7 @@ func deleteDatabaseHandler(w http.ResponseWriter, r *http.Request) {
23002300
23012301 // Delete the database in PostgreSQL
23022302 err = com .DeleteDatabase (dbOwner , dbName )
2303- if err != err {
2303+ if err != nil {
23042304 w .WriteHeader (http .StatusInternalServerError )
23052305 fmt .Fprint (w , "Internal server error" )
23062306 log .Println (err )
@@ -2349,7 +2349,7 @@ func deleteReleaseHandler(w http.ResponseWriter, r *http.Request) {
23492349
23502350 // Make sure the database exists in the system
23512351 exists , err := com .CheckDBPermissions (loggedInUser , dbOwner , dbName , true )
2352- if err != err {
2352+ if err != nil {
23532353 w .WriteHeader (http .StatusInternalServerError )
23542354 return
23552355 }
@@ -2430,7 +2430,7 @@ func deleteTagHandler(w http.ResponseWriter, r *http.Request) {
24302430
24312431 // Make sure the database exists in the system
24322432 exists , err := com .CheckDBPermissions (loggedInUser , dbOwner , dbName , true )
2433- if err != err {
2433+ if err != nil {
24342434 w .WriteHeader (http .StatusInternalServerError )
24352435 return
24362436 }
@@ -2981,7 +2981,7 @@ func insertDataHandler(w http.ResponseWriter, r *http.Request) {
29812981
29822982 // Make sure the database exists in the system, and the user has write access to it
29832983 exists , err := com .CheckDBPermissions (loggedInUser , dbOwner , dbName , true )
2984- if err != err {
2984+ if err != nil {
29852985 w .WriteHeader (http .StatusInternalServerError )
29862986 return
29872987 }
@@ -4210,7 +4210,7 @@ func setDefaultBranchHandler(w http.ResponseWriter, r *http.Request) {
42104210
42114211 // Make sure the database exists in the system
42124212 exists , err := com .CheckDBPermissions (loggedInUser , dbOwner , dbName , true )
4213- if err != err {
4213+ if err != nil {
42144214 w .WriteHeader (http .StatusInternalServerError )
42154215 return
42164216 }
@@ -4344,7 +4344,7 @@ func tableNamesHandler(w http.ResponseWriter, r *http.Request) {
43444344
43454345 // Make sure the database exists in the system
43464346 exists , err := com .CheckDBPermissions (loggedInUser , dbOwner , dbName , false )
4347- if err != err {
4347+ if err != nil {
43484348 w .WriteHeader (http .StatusInternalServerError )
43494349 return
43504350 }
@@ -4525,7 +4525,7 @@ func tableViewHandler(w http.ResponseWriter, r *http.Request) {
45254525 // Make sure the database exists in the system, and the user has access to it
45264526 var exists bool
45274527 exists , err = com .CheckDBPermissions (loggedInUser , dbOwner , dbName , false )
4528- if err != err {
4528+ if err != nil {
45294529 w .WriteHeader (http .StatusInternalServerError )
45304530 return
45314531 }
@@ -4799,7 +4799,7 @@ func updateBranchHandler(w http.ResponseWriter, r *http.Request) {
47994799
48004800 // Make sure the database exists in the system
48014801 exists , err := com .CheckDBPermissions (loggedInUser , dbOwner , dbName , true )
4802- if err != err {
4802+ if err != nil {
48034803 w .WriteHeader (http .StatusInternalServerError )
48044804 return
48054805 }
@@ -4954,7 +4954,7 @@ func updateCommentHandler(w http.ResponseWriter, r *http.Request) {
49544954
49554955 // Make sure the database exists in the system
49564956 exists , err := com .CheckDBPermissions (loggedInUser , dbOwner , dbName , false ) // We don't require write access since discussions are considered public
4957- if err != err {
4957+ if err != nil {
49584958 w .WriteHeader (http .StatusInternalServerError )
49594959 return
49604960 }
@@ -4995,7 +4995,7 @@ func updateDataHandler(w http.ResponseWriter, r *http.Request) {
49954995
49964996 // Make sure the database exists in the system, and the user has write access to it
49974997 exists , err := com .CheckDBPermissions (loggedInUser , dbOwner , dbName , true )
4998- if err != err {
4998+ if err != nil {
49994999 w .WriteHeader (http .StatusInternalServerError )
50005000 return
50015001 }
@@ -5168,7 +5168,7 @@ func updateDiscussHandler(w http.ResponseWriter, r *http.Request) {
51685168
51695169 // Make sure the database exists in the system
51705170 exists , err := com .CheckDBPermissions (loggedInUser , dbOwner , dbName , false ) // We don't require write access since MRs are considered public
5171- if err != err {
5171+ if err != nil {
51725172 w .WriteHeader (http .StatusInternalServerError )
51735173 fmt .Fprint (w , err .Error ())
51745174 return
@@ -5261,7 +5261,7 @@ func updateReleaseHandler(w http.ResponseWriter, r *http.Request) {
52615261
52625262 // Make sure the database exists in the system
52635263 exists , err := com .CheckDBPermissions (loggedInUser , dbOwner , dbName , true )
5264- if err != err {
5264+ if err != nil {
52655265 w .WriteHeader (http .StatusInternalServerError )
52665266 return
52675267 }
@@ -5375,7 +5375,7 @@ func updateTagHandler(w http.ResponseWriter, r *http.Request) {
53755375
53765376 // Make sure the database exists in the system
53775377 exists , err := com .CheckDBPermissions (loggedInUser , dbOwner , dbName , true )
5378- if err != err {
5378+ if err != nil {
53795379 w .WriteHeader (http .StatusInternalServerError )
53805380 return
53815381 }
0 commit comments