20 lines
387 B
Go
20 lines
387 B
Go
package address
|
|
|
|
import (
|
|
"api-poliklinik/internal/database"
|
|
connDatabase "api-poliklinik/pkg/database/satu_data"
|
|
"github.com/gin-gonic/gin"
|
|
"log"
|
|
"net/http"
|
|
)
|
|
|
|
func GetDataAlamat(c *gin.Context) {
|
|
db := database.New().GetDB("simrs")
|
|
simrs := connDatabase.NewDatabaseService(db)
|
|
|
|
log.Println("REQUEST")
|
|
dataAlamat := simrs.GetDataAddress()
|
|
|
|
c.JSON(http.StatusOK, dataAlamat)
|
|
}
|