(w http.ResponseWriter, r *http.Request)
| 959 | } |
| 960 | |
| 961 | func (s *service) getDebugFile(w http.ResponseWriter, r *http.Request) { |
| 962 | qs := r.URL.Query() |
| 963 | folder := qs.Get("folder") |
| 964 | file := qs.Get("file") |
| 965 | |
| 966 | lf, _, _ := s.model.CurrentFolderFile(folder, file) |
| 967 | gf, _, _ := s.model.CurrentGlobalFile(folder, file) |
| 968 | av, _ := s.model.Availability(folder, protocol.FileInfo{Name: file}, protocol.BlockInfo{}) |
| 969 | |
| 970 | sendJSON(w, map[string]interface{}{ |
| 971 | "global": jsonFileInfo(gf), |
| 972 | "local": jsonFileInfo(lf), |
| 973 | "availability": av, |
| 974 | }) |
| 975 | } |
| 976 | |
| 977 | func (s *service) postSystemRestart(w http.ResponseWriter, _ *http.Request) { |
| 978 | s.flushResponse(`{"ok": "restarting"}`, w) |
nothing calls this directly
no test coverage detected