Loading start.sh +18 −12 Original line number Diff line number Diff line Loading @@ -679,9 +679,10 @@ func main() { // Map to store verification codes verificationCodes := make(map[string]string) // Mock API server for main application http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") fmt.Fprintf(w, \`{"status":"ok","version":"mock-1.0.0","time":"%s"}\`, time.Now().Format(time.RFC3339)) fmt.Fprintf(w, `{"status":"ok","version":"mock-1.0.0","time":"%s"}`, time.Now().Format(time.RFC3339)) }) // Handle OTT (One-Time Token) requests - this is the SPECIFIC endpoint the Ente client uses Loading Loading @@ -789,7 +790,7 @@ func main() { } else { // Just handle other methods with a generic response w.Header().Set("Content-Type", "application/json") fmt.Fprintf(w, \`{"status":"mock","endpoint":"%s","method":"%s"}\`, r.URL.Path, r.Method) fmt.Fprintf(w, `{"status":"mock","endpoint":"%s","method":"%s"}`, r.URL.Path, r.Method) } }) Loading Loading @@ -897,7 +898,7 @@ func main() { } else { // Handle other methods with a generic response w.Header().Set("Content-Type", "application/json") fmt.Fprintf(w, \`{"status":"mock","endpoint":"%s","method":"%s"}\`, r.URL.Path, r.Method) fmt.Fprintf(w, `{"status":"mock","endpoint":"%s","method":"%s"}`, r.URL.Path, r.Method) } }) Loading Loading @@ -1003,9 +1004,10 @@ func main() { // Map to store verification codes verificationCodes := make(map[string]string) // Mock API server for main application http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") fmt.Fprintf(w, \`{"status":"ok","version":"mock-1.0.0","time":"%s"}\`, time.Now().Format(time.RFC3339)) fmt.Fprintf(w, `{"status":"ok","version":"mock-1.0.0","time":"%s"}`, time.Now().Format(time.RFC3339)) }) // Handle registration requests Loading Loading @@ -1057,7 +1059,7 @@ func main() { } else { // Just handle other methods with a generic response w.Header().Set("Content-Type", "application/json") fmt.Fprintf(w, \`{"status":"mock","endpoint":"%s","method":"%s"}\`, r.URL.Path, r.Method) fmt.Fprintf(w, `{"status":"mock","endpoint":"%s","method":"%s"}`, r.URL.Path, r.Method) } }) Loading Loading @@ -1165,7 +1167,7 @@ func main() { } else { // Handle other methods with a generic response w.Header().Set("Content-Type", "application/json") fmt.Fprintf(w, \`{"status":"mock","endpoint":"%s","method":"%s"}\`, r.URL.Path, r.Method) fmt.Fprintf(w, `{"status":"mock","endpoint":"%s","method":"%s"}`, r.URL.Path, r.Method) } }) Loading Loading @@ -1310,6 +1312,7 @@ func main() { } logger := log.New(multiWriter, "", log.LstdFlags) // Mock API server for public albums http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") Loading @@ -1323,6 +1326,10 @@ func main() { json.NewEncoder(w).Encode(response) }) // Just handle other methods with a generic response w.Header().Set("Content-Type", "application/json") fmt.Fprintf(w, `{"status":"mock","endpoint":"%s","method":"%s"}`, r.URL.Path, r.Method) http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { logger.Printf("Public Albums: Received request for %s via %s", r.URL.Path, r.Method) Loading @@ -1336,9 +1343,6 @@ func main() { w.Header().Set("Content-Type", "application/json") // Use fmt.Fprintf to explicitly use the fmt package fmt.Fprintf(w, "{\"status\":\"processing\"}") // Use json package to create the response response := map[string]string{ "status": "mock", Loading Loading @@ -1420,6 +1424,7 @@ func main() { } logger := log.New(multiWriter, "", log.LstdFlags) // Mock API server for public albums http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") Loading @@ -1433,6 +1438,10 @@ func main() { json.NewEncoder(w).Encode(response) }) // Just handle other methods with a generic response w.Header().Set("Content-Type", "application/json") fmt.Fprintf(w, `{"status":"mock","endpoint":"%s","method":"%s"}`, r.URL.Path, r.Method) http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { logger.Printf("Public Albums: Received request for %s via %s", r.URL.Path, r.Method) Loading @@ -1446,9 +1455,6 @@ func main() { w.Header().Set("Content-Type", "application/json") // Use fmt.Fprintf to explicitly use the fmt package fmt.Fprintf(w, "{\"status\":\"processing\"}") // Use json package to create the response response := map[string]string{ "status": "mock", Loading Loading
start.sh +18 −12 Original line number Diff line number Diff line Loading @@ -679,9 +679,10 @@ func main() { // Map to store verification codes verificationCodes := make(map[string]string) // Mock API server for main application http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") fmt.Fprintf(w, \`{"status":"ok","version":"mock-1.0.0","time":"%s"}\`, time.Now().Format(time.RFC3339)) fmt.Fprintf(w, `{"status":"ok","version":"mock-1.0.0","time":"%s"}`, time.Now().Format(time.RFC3339)) }) // Handle OTT (One-Time Token) requests - this is the SPECIFIC endpoint the Ente client uses Loading Loading @@ -789,7 +790,7 @@ func main() { } else { // Just handle other methods with a generic response w.Header().Set("Content-Type", "application/json") fmt.Fprintf(w, \`{"status":"mock","endpoint":"%s","method":"%s"}\`, r.URL.Path, r.Method) fmt.Fprintf(w, `{"status":"mock","endpoint":"%s","method":"%s"}`, r.URL.Path, r.Method) } }) Loading Loading @@ -897,7 +898,7 @@ func main() { } else { // Handle other methods with a generic response w.Header().Set("Content-Type", "application/json") fmt.Fprintf(w, \`{"status":"mock","endpoint":"%s","method":"%s"}\`, r.URL.Path, r.Method) fmt.Fprintf(w, `{"status":"mock","endpoint":"%s","method":"%s"}`, r.URL.Path, r.Method) } }) Loading Loading @@ -1003,9 +1004,10 @@ func main() { // Map to store verification codes verificationCodes := make(map[string]string) // Mock API server for main application http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") fmt.Fprintf(w, \`{"status":"ok","version":"mock-1.0.0","time":"%s"}\`, time.Now().Format(time.RFC3339)) fmt.Fprintf(w, `{"status":"ok","version":"mock-1.0.0","time":"%s"}`, time.Now().Format(time.RFC3339)) }) // Handle registration requests Loading Loading @@ -1057,7 +1059,7 @@ func main() { } else { // Just handle other methods with a generic response w.Header().Set("Content-Type", "application/json") fmt.Fprintf(w, \`{"status":"mock","endpoint":"%s","method":"%s"}\`, r.URL.Path, r.Method) fmt.Fprintf(w, `{"status":"mock","endpoint":"%s","method":"%s"}`, r.URL.Path, r.Method) } }) Loading Loading @@ -1165,7 +1167,7 @@ func main() { } else { // Handle other methods with a generic response w.Header().Set("Content-Type", "application/json") fmt.Fprintf(w, \`{"status":"mock","endpoint":"%s","method":"%s"}\`, r.URL.Path, r.Method) fmt.Fprintf(w, `{"status":"mock","endpoint":"%s","method":"%s"}`, r.URL.Path, r.Method) } }) Loading Loading @@ -1310,6 +1312,7 @@ func main() { } logger := log.New(multiWriter, "", log.LstdFlags) // Mock API server for public albums http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") Loading @@ -1323,6 +1326,10 @@ func main() { json.NewEncoder(w).Encode(response) }) // Just handle other methods with a generic response w.Header().Set("Content-Type", "application/json") fmt.Fprintf(w, `{"status":"mock","endpoint":"%s","method":"%s"}`, r.URL.Path, r.Method) http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { logger.Printf("Public Albums: Received request for %s via %s", r.URL.Path, r.Method) Loading @@ -1336,9 +1343,6 @@ func main() { w.Header().Set("Content-Type", "application/json") // Use fmt.Fprintf to explicitly use the fmt package fmt.Fprintf(w, "{\"status\":\"processing\"}") // Use json package to create the response response := map[string]string{ "status": "mock", Loading Loading @@ -1420,6 +1424,7 @@ func main() { } logger := log.New(multiWriter, "", log.LstdFlags) // Mock API server for public albums http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") Loading @@ -1433,6 +1438,10 @@ func main() { json.NewEncoder(w).Encode(response) }) // Just handle other methods with a generic response w.Header().Set("Content-Type", "application/json") fmt.Fprintf(w, `{"status":"mock","endpoint":"%s","method":"%s"}`, r.URL.Path, r.Method) http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { logger.Printf("Public Albums: Received request for %s via %s", r.URL.Path, r.Method) Loading @@ -1446,9 +1455,6 @@ func main() { w.Header().Set("Content-Type", "application/json") // Use fmt.Fprintf to explicitly use the fmt package fmt.Fprintf(w, "{\"status\":\"processing\"}") // Use json package to create the response response := map[string]string{ "status": "mock", Loading