feat: require hospital code and add company APIs

This commit is contained in:
2026-08-28 10:30:08 +07:00
parent a59b2c6443
commit 8dd880003d
17 changed files with 867 additions and 142 deletions

View File

@@ -171,7 +171,12 @@ func currentRequestURL(r *http.Request, page int) string {
if host == "" {
host = "localhost"
}
return (&url.URL{Scheme: scheme, Host: host, Path: r.URL.Path, RawQuery: "page=" + strconv.Itoa(page)}).String()
query := url.Values{}
if code := r.URL.Query().Get("kode_rs"); code != "" {
query.Set("kode_rs", code)
}
query.Set("page", strconv.Itoa(page))
return (&url.URL{Scheme: scheme, Host: host, Path: r.URL.Path, RawQuery: query.Encode()}).String()
}
func writePaketValidationError(w http.ResponseWriter, message string) {