modified: main.go
fix loosed breackeds
This commit is contained in:
@@ -22,7 +22,7 @@ type User struct {
|
||||
|
||||
func handler(w http.ResponseWriter, r *http.Request) {
|
||||
// Get DB connection from context
|
||||
db, ok := r.Context().Value("db").(*gorm.DB
|
||||
db, ok := r.Context().Value("db").(*gorm.DB)
|
||||
if !ok {
|
||||
http.Error(w, "Database connection not found", http.StatusInternalServerError)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user