(w http.ResponseWriter, r *http.Request)
| 396 | } |
| 397 | |
| 398 | func (a *APIController) InstanceSystemInfoHandler(w http.ResponseWriter, r *http.Request) { |
| 399 | ctx := r.Context() |
| 400 | |
| 401 | var updateMessage runnerParams.UpdateSystemInfoParams |
| 402 | if err := json.NewDecoder(r.Body).Decode(&updateMessage); err != nil { |
| 403 | slog.With(slog.Any("error", err)).ErrorContext(ctx, "failed to decode") |
| 404 | handleError(ctx, w, gErrors.ErrBadRequest) |
| 405 | return |
| 406 | } |
| 407 | |
| 408 | if err := a.r.UpdateSystemInfo(ctx, updateMessage); err != nil { |
| 409 | slog.With(slog.Any("error", err)).ErrorContext(ctx, "error saving status message") |
| 410 | handleError(ctx, w, err) |
| 411 | return |
| 412 | } |
| 413 | |
| 414 | w.Header().Set("Content-Type", "application/json") |
| 415 | w.WriteHeader(http.StatusOK) |
| 416 | } |
nothing calls this directly
no test coverage detected