MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / handleGetDbConfigFunctions

Method handleGetDbConfigFunctions

rest/admin_functions_api.go:21–31  ·  view source on GitHub ↗

JS FUNCTIONS: GET config: user functions.

()

Source from the content-addressed store, hash-verified

19
20// GET config: user functions.
21func (h *handler) handleGetDbConfigFunctions() error {
22 if config, etagVersion, err := h.getDBConfig(); err != nil {
23 return err
24 } else if config.UserFunctions == nil {
25 return base.HTTPErrorf(http.StatusNotFound, "")
26 } else {
27 h.writeJSON(config.UserFunctions)
28 h.setEtag(etagVersion)
29 return nil
30 }
31}
32
33// GET config: a single user function
34func (h *handler) handleGetDbConfigFunction() error {

Callers

nothing calls this directly

Calls 4

getDBConfigMethod · 0.95
writeJSONMethod · 0.95
setEtagMethod · 0.95
HTTPErrorfFunction · 0.92

Tested by

no test coverage detected