refactor(handler): Move array manipulation
All checks were successful
ci/woodpecker/push/build Pipeline was successful
All checks were successful
ci/woodpecker/push/build Pipeline was successful
This commit is contained in:
parent
df9f7fdc13
commit
4d57cf827d
@ -37,8 +37,6 @@ func (h *DefaultHandler) GenerateContract(c *fiber.Ctx) error {
|
|||||||
|
|
||||||
logger = logger.With("locale", contract.Locale)
|
logger = logger.With("locale", contract.Locale)
|
||||||
|
|
||||||
contract.Runners = repeatRunnerArrayItems(contract.Runners, 2)
|
|
||||||
|
|
||||||
templateString, err := h.StaticService.GetTemplate(contract.Locale, "contract")
|
templateString, err := h.StaticService.GetTemplate(contract.Locale, "contract")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Errorw("Template not found", "error", err)
|
logger.Errorw("Template not found", "error", err)
|
||||||
@ -55,7 +53,7 @@ func (h *DefaultHandler) GenerateContract(c *fiber.Ctx) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
genConfig := &models.ContractTemplateOptions{
|
genConfig := &models.ContractTemplateOptions{
|
||||||
Runners: contract.Runners,
|
Runners: repeatRunnerArrayItems(contract.Runners, 2),
|
||||||
CurrencySymbol: h.Config.CurrencySymbol,
|
CurrencySymbol: h.Config.CurrencySymbol,
|
||||||
Disclaimer: h.Config.SponosringDisclaimer,
|
Disclaimer: h.Config.SponosringDisclaimer,
|
||||||
ReceiptMinimumAmount: h.Config.SponsoringReceiptMinimum,
|
ReceiptMinimumAmount: h.Config.SponsoringReceiptMinimum,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user