api dokter reference

This commit is contained in:
renaldybrada
2026-01-27 15:19:03 +07:00
parent 53db93c0c1
commit 5d799cfc46
6 changed files with 200 additions and 0 deletions

No files matched your search

@@ -0,0 +1,26 @@
package dokter
import (
"net/http"
"github.com/gin-gonic/gin"
)
type DokterHandler struct {
repo IDokterRepository
}
func NewDokterHandler(repo IDokterRepository) DokterHandler {
return DokterHandler{repo}
}
func (h DokterHandler) ListDokter(c *gin.Context) {
var list ListDokterModel
list, err := h.repo.SearchableListDokter(c)
if err != nil {
c.JSON(http.StatusInternalServerError, err)
}
c.JSON(http.StatusOK, list.ToResponseList())
}