feat: add dynamic hospital database registry
This commit is contained in:
@@ -21,7 +21,7 @@ func (h Handler) AddLabServices(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
outcome, err := h.labRepo.AddLabServices(r.Context(), r.PathValue("regId"), params)
|
||||
outcome, err := h.labRepository(r.Context()).AddLabServices(r.Context(), r.PathValue("regId"), params)
|
||||
if err != nil {
|
||||
if validationErr, ok := asValidationError(err); ok {
|
||||
writeLabResponse(w, http.StatusUnprocessableEntity, false, "validation_error", validationErr, nil)
|
||||
|
||||
Reference in New Issue
Block a user