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

Method ToggleMandatory

src/controller/bundle_controller.go:112–123  ·  view source on GitHub ↗
(c *fiber.Ctx)

Source from the content-addressed store, hash-verified

110}
111
112func (bundleController *bundleControllerImpl) ToggleMandatory(c *fiber.Ctx) error {
113 bundleId := c.Params("bundleId")
114 bundleIdPrimitive, err := primitive.ObjectIDFromHex(bundleId)
115 if err != nil {
116 return utils.ErrorResponse(c, err.Error())
117 }
118 err = bundleController.bundleService.ToggleMandatory(bundleIdPrimitive)
119 if err != nil {
120 return utils.ErrorResponse(c, err.Error())
121 }
122 return utils.SuccessResponse(c, nil)
123}
124
125func (bundleController *bundleControllerImpl) ToggleActive(c *fiber.Ctx) error {
126 bundleId := c.Params("bundleId")

Callers

nothing calls this directly

Calls 3

ErrorResponseFunction · 0.92
SuccessResponseFunction · 0.92
ToggleMandatoryMethod · 0.65

Tested by

no test coverage detected