(c *gin.Context)
| 947 | } |
| 948 | |
| 949 | func (h *BaseHandlers) ListMemoryDailyLogs(c *gin.Context) { |
| 950 | if h.MemoryStore == nil { |
| 951 | h.respondMemoryError(c, http.StatusInternalServerError, errors.New("memory store is not configured"), nil) |
| 952 | return |
| 953 | } |
| 954 | query, err := h.memoryDailyLogListQuery(c) |
| 955 | if err != nil { |
| 956 | h.respondMemoryError(c, StatusForMemoryError(err), err, nil) |
| 957 | return |
| 958 | } |
| 959 | records, err := h.MemoryStore.ListDailyLogRecords(c.Request.Context(), query) |
| 960 | if err != nil { |
| 961 | h.respondMemoryError(c, StatusForMemoryError(err), err, nil) |
| 962 | return |
| 963 | } |
| 964 | payloads := make([]contract.MemoryDailyLogPayload, 0, len(records)) |
| 965 | for _, record := range records { |
| 966 | payloads = append(payloads, memoryDailyLogPayload(record)) |
| 967 | } |
| 968 | c.JSON(http.StatusOK, contract.MemoryDailyLogListResponse{Logs: payloads}) |
| 969 | } |
| 970 | |
| 971 | func (h *BaseHandlers) GetMemoryExtractorStatus(c *gin.Context) { |
| 972 | if h.MemoryExtractor == nil { |
nothing calls this directly
no test coverage detected