MCPcopy Create free account
hub / github.com/SwishHQ/spread / ReportStatusDownload

Method ReportStatusDownload

src/controller/client_controller.go:64–77  ·  view source on GitHub ↗
(ctx *fiber.Ctx)

Source from the content-addressed store, hash-verified

62}
63
64func (c *clientController) ReportStatusDownload(ctx *fiber.Ctx) error {
65 reportStatusRequest := new(types.ReportStatusDownloadRequest)
66 validationErrors := utils.BindAndValidate(ctx, reportStatusRequest)
67 if len(validationErrors) > 0 {
68 logger.L.Error("In ReportStatusDownload: Validation errors", zap.Any("validationErrors", validationErrors))
69 return ctx.Status(fiber.StatusOK).Send([]byte("OK"))
70 }
71 logger.L.Info("In ReportStatusDownload", zap.Any("reportStatusRequest", reportStatusRequest))
72 err := c.clientService.ReportStatusDownload(reportStatusRequest)
73 if err != nil {
74 logger.L.Error("In ReportStatusDownload: Error reporting status", zap.Error(err))
75 }
76 return ctx.Status(fiber.StatusOK).Send([]byte("OK"))
77}

Callers

nothing calls this directly

Calls 2

BindAndValidateFunction · 0.92
ReportStatusDownloadMethod · 0.65

Tested by

no test coverage detected