HTTP handler for the root ("/")
()
| 56 | |
| 57 | // HTTP handler for the root ("/") |
| 58 | func (h *handler) handleRoot() error { |
| 59 | resp := rootResponse{ |
| 60 | Admin: h.serverType == adminServer, |
| 61 | CouchDB: "Welcome", |
| 62 | Vendor: vendor{ |
| 63 | Name: base.ProductNameString, |
| 64 | }, |
| 65 | PersistentConfig: h.server.persistentConfig, |
| 66 | } |
| 67 | |
| 68 | if h.shouldShowProductVersion() { |
| 69 | resp.Version = base.LongVersionString |
| 70 | resp.Vendor.Version = base.ProductAPIVersion |
| 71 | } |
| 72 | |
| 73 | h.writeJSON(resp) |
| 74 | return nil |
| 75 | } |
| 76 | |
| 77 | // HTTP handler for a simple ping healthcheck |
| 78 | func (h *handler) handlePing() error { |
nothing calls this directly
no test coverage detected