@@ -316,7 +316,7 @@ func branchNamesHandler(w http.ResponseWriter, r *http.Request) {
316
316
317
317
// Make sure the database exists in the system
318
318
exists , err := com .CheckDBPermissions (loggedInUser , dbOwner , dbName , false )
319
- if err != err {
319
+ if err != nil {
320
320
w .WriteHeader (http .StatusInternalServerError )
321
321
fmt .Fprint (w , err .Error ())
322
322
return
@@ -1443,7 +1443,7 @@ func deleteBranchHandler(w http.ResponseWriter, r *http.Request) {
1443
1443
1444
1444
// Make sure the database exists in the system
1445
1445
exists , err := com .CheckDBPermissions (loggedInUser , dbOwner , dbName , true )
1446
- if err != err {
1446
+ if err != nil {
1447
1447
w .WriteHeader (http .StatusInternalServerError )
1448
1448
return
1449
1449
}
@@ -1941,7 +1941,7 @@ func deleteCommitHandler(w http.ResponseWriter, r *http.Request) {
1941
1941
1942
1942
// Make sure the database exists in the system
1943
1943
exists , err := com .CheckDBPermissions (loggedInUser , dbOwner , dbName , true )
1944
- if err != err {
1944
+ if err != nil {
1945
1945
w .WriteHeader (http .StatusInternalServerError )
1946
1946
return
1947
1947
}
@@ -2114,7 +2114,7 @@ func deleteDataHandler(w http.ResponseWriter, r *http.Request) {
2114
2114
2115
2115
// Make sure the database exists in the system, and the user has write access to it
2116
2116
exists , err := com .CheckDBPermissions (loggedInUser , dbOwner , dbName , true )
2117
- if err != err {
2117
+ if err != nil {
2118
2118
w .WriteHeader (http .StatusInternalServerError )
2119
2119
return
2120
2120
}
@@ -2225,7 +2225,7 @@ func deleteDatabaseHandler(w http.ResponseWriter, r *http.Request) {
2225
2225
2226
2226
// Make sure the database exists in the system
2227
2227
exists , err := com .CheckDBPermissions (loggedInUser , dbOwner , dbName , true )
2228
- if err != err {
2228
+ if err != nil {
2229
2229
w .WriteHeader (http .StatusInternalServerError )
2230
2230
fmt .Fprint (w , "Internal server error" )
2231
2231
return
@@ -2300,7 +2300,7 @@ func deleteDatabaseHandler(w http.ResponseWriter, r *http.Request) {
2300
2300
2301
2301
// Delete the database in PostgreSQL
2302
2302
err = com .DeleteDatabase (dbOwner , dbName )
2303
- if err != err {
2303
+ if err != nil {
2304
2304
w .WriteHeader (http .StatusInternalServerError )
2305
2305
fmt .Fprint (w , "Internal server error" )
2306
2306
log .Println (err )
@@ -2349,7 +2349,7 @@ func deleteReleaseHandler(w http.ResponseWriter, r *http.Request) {
2349
2349
2350
2350
// Make sure the database exists in the system
2351
2351
exists , err := com .CheckDBPermissions (loggedInUser , dbOwner , dbName , true )
2352
- if err != err {
2352
+ if err != nil {
2353
2353
w .WriteHeader (http .StatusInternalServerError )
2354
2354
return
2355
2355
}
@@ -2430,7 +2430,7 @@ func deleteTagHandler(w http.ResponseWriter, r *http.Request) {
2430
2430
2431
2431
// Make sure the database exists in the system
2432
2432
exists , err := com .CheckDBPermissions (loggedInUser , dbOwner , dbName , true )
2433
- if err != err {
2433
+ if err != nil {
2434
2434
w .WriteHeader (http .StatusInternalServerError )
2435
2435
return
2436
2436
}
@@ -2981,7 +2981,7 @@ func insertDataHandler(w http.ResponseWriter, r *http.Request) {
2981
2981
2982
2982
// Make sure the database exists in the system, and the user has write access to it
2983
2983
exists , err := com .CheckDBPermissions (loggedInUser , dbOwner , dbName , true )
2984
- if err != err {
2984
+ if err != nil {
2985
2985
w .WriteHeader (http .StatusInternalServerError )
2986
2986
return
2987
2987
}
@@ -4210,7 +4210,7 @@ func setDefaultBranchHandler(w http.ResponseWriter, r *http.Request) {
4210
4210
4211
4211
// Make sure the database exists in the system
4212
4212
exists , err := com .CheckDBPermissions (loggedInUser , dbOwner , dbName , true )
4213
- if err != err {
4213
+ if err != nil {
4214
4214
w .WriteHeader (http .StatusInternalServerError )
4215
4215
return
4216
4216
}
@@ -4344,7 +4344,7 @@ func tableNamesHandler(w http.ResponseWriter, r *http.Request) {
4344
4344
4345
4345
// Make sure the database exists in the system
4346
4346
exists , err := com .CheckDBPermissions (loggedInUser , dbOwner , dbName , false )
4347
- if err != err {
4347
+ if err != nil {
4348
4348
w .WriteHeader (http .StatusInternalServerError )
4349
4349
return
4350
4350
}
@@ -4525,7 +4525,7 @@ func tableViewHandler(w http.ResponseWriter, r *http.Request) {
4525
4525
// Make sure the database exists in the system, and the user has access to it
4526
4526
var exists bool
4527
4527
exists , err = com .CheckDBPermissions (loggedInUser , dbOwner , dbName , false )
4528
- if err != err {
4528
+ if err != nil {
4529
4529
w .WriteHeader (http .StatusInternalServerError )
4530
4530
return
4531
4531
}
@@ -4799,7 +4799,7 @@ func updateBranchHandler(w http.ResponseWriter, r *http.Request) {
4799
4799
4800
4800
// Make sure the database exists in the system
4801
4801
exists , err := com .CheckDBPermissions (loggedInUser , dbOwner , dbName , true )
4802
- if err != err {
4802
+ if err != nil {
4803
4803
w .WriteHeader (http .StatusInternalServerError )
4804
4804
return
4805
4805
}
@@ -4954,7 +4954,7 @@ func updateCommentHandler(w http.ResponseWriter, r *http.Request) {
4954
4954
4955
4955
// Make sure the database exists in the system
4956
4956
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 {
4958
4958
w .WriteHeader (http .StatusInternalServerError )
4959
4959
return
4960
4960
}
@@ -4995,7 +4995,7 @@ func updateDataHandler(w http.ResponseWriter, r *http.Request) {
4995
4995
4996
4996
// Make sure the database exists in the system, and the user has write access to it
4997
4997
exists , err := com .CheckDBPermissions (loggedInUser , dbOwner , dbName , true )
4998
- if err != err {
4998
+ if err != nil {
4999
4999
w .WriteHeader (http .StatusInternalServerError )
5000
5000
return
5001
5001
}
@@ -5168,7 +5168,7 @@ func updateDiscussHandler(w http.ResponseWriter, r *http.Request) {
5168
5168
5169
5169
// Make sure the database exists in the system
5170
5170
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 {
5172
5172
w .WriteHeader (http .StatusInternalServerError )
5173
5173
fmt .Fprint (w , err .Error ())
5174
5174
return
@@ -5261,7 +5261,7 @@ func updateReleaseHandler(w http.ResponseWriter, r *http.Request) {
5261
5261
5262
5262
// Make sure the database exists in the system
5263
5263
exists , err := com .CheckDBPermissions (loggedInUser , dbOwner , dbName , true )
5264
- if err != err {
5264
+ if err != nil {
5265
5265
w .WriteHeader (http .StatusInternalServerError )
5266
5266
return
5267
5267
}
@@ -5375,7 +5375,7 @@ func updateTagHandler(w http.ResponseWriter, r *http.Request) {
5375
5375
5376
5376
// Make sure the database exists in the system
5377
5377
exists , err := com .CheckDBPermissions (loggedInUser , dbOwner , dbName , true )
5378
- if err != err {
5378
+ if err != nil {
5379
5379
w .WriteHeader (http .StatusInternalServerError )
5380
5380
return
5381
5381
}
0 commit comments