add cron job to sync currencies once in 24 hours

This commit is contained in:
Fran Jurmanović
2023-04-13 18:10:21 +02:00
parent cf1d4f8b1a
commit 84b00a9ddf
22 changed files with 407 additions and 25 deletions

View File

@@ -2,13 +2,14 @@ package controller
import (
"fmt"
"go.uber.org/dig"
"strconv"
"strings"
"wallet-api/pkg/model"
"wallet-api/pkg/service"
"wallet-api/pkg/utl/common"
"go.uber.org/dig"
"github.com/gin-gonic/gin"
)
@@ -21,17 +22,18 @@ Initializes Dependency Injection modules and registers controllers
*dig.Container: Dig Container
*/
func InitializeControllers(c *dig.Container) {
service.InitializeServices(c)
controllerContainer := c.Scope("controller")
service.InitializeServices(controllerContainer)
c.Invoke(NewApiController)
c.Invoke(NewUserController)
c.Invoke(NewWalletController)
c.Invoke(NewWalletHeaderController)
c.Invoke(NewTransactionController)
c.Invoke(NewTransactionStatusController)
c.Invoke(NewTransactionTypeController)
c.Invoke(NewSubscriptionController)
c.Invoke(NewSubscriptionTypeController)
controllerContainer.Invoke(NewApiController)
controllerContainer.Invoke(NewUserController)
controllerContainer.Invoke(NewWalletController)
controllerContainer.Invoke(NewWalletHeaderController)
controllerContainer.Invoke(NewTransactionController)
controllerContainer.Invoke(NewTransactionStatusController)
controllerContainer.Invoke(NewTransactionTypeController)
controllerContainer.Invoke(NewSubscriptionController)
controllerContainer.Invoke(NewSubscriptionTypeController)
}