GET config: a single user function
()
| 32 | |
| 33 | // GET config: a single user function |
| 34 | func (h *handler) handleGetDbConfigFunction() error { |
| 35 | functionName := h.PathVar("function") |
| 36 | if config, etagVersion, err := h.getDBConfig(); err != nil { |
| 37 | return err |
| 38 | } else if config.UserFunctions == nil { |
| 39 | return base.HTTPErrorf(http.StatusNotFound, "") |
| 40 | } else if functionConfig, found := config.UserFunctions.Definitions[functionName]; !found { |
| 41 | return base.HTTPErrorf(http.StatusNotFound, "") |
| 42 | } else { |
| 43 | h.writeJSON(functionConfig) |
| 44 | h.setEtag(etagVersion) |
| 45 | return nil |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | // PUT/DELETE config: user function(s) |
| 50 | func (h *handler) handlePutDbConfigFunctions() error { |
nothing calls this directly
no test coverage detected