penambahan template selanjutnya
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
||||
|
||||
func InsertPatient(c *gin.Context) {
|
||||
local := os.Getenv("MONGODB_DEV_LOCAL")
|
||||
db := database.New(local).GetDB()
|
||||
db := database.New(local).GetMongoDB()
|
||||
if db == nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"message": "Database connection failed"})
|
||||
return
|
||||
@@ -39,7 +39,7 @@ func InsertPatient(c *gin.Context) {
|
||||
|
||||
func GetAllPatient(c *gin.Context) {
|
||||
local := os.Getenv("MONGODB_DEV_LOCAL")
|
||||
db := database.New(local).GetDB()
|
||||
db := database.New(local).GetMongoDB()
|
||||
if db == nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"message": "Database connection failed"})
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user