Skip to content

Commit

Permalink
Merge branch 'release/v1.1.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
namnhce committed Feb 29, 2024
2 parents f7c3677 + 3eef869 commit c7a6ce5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
22 changes: 11 additions & 11 deletions pkg/handler/payroll/commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,17 @@ func (h *handler) CommitPayroll(c *gin.Context) {
return
}

//err = h.controller.Discord.Log(model.LogDiscordInput{
// Type: "payroll_commit",
// Data: map[string]interface{}{
// "batch_number": strconv.Itoa(int(batch)),
// "month": time.Month(month).String(),
// "year": year,
// },
//})
//if err != nil {
// l.Error(err, "failed to logs to discord")
//}
err = h.controller.Discord.Log(model.LogDiscordInput{
Type: "payroll_commit",
Data: map[string]interface{}{
"batch_number": strconv.Itoa(int(batch)),
"month": time.Month(month).String(),
"year": year,
},
})
if err != nil {
l.Error(err, "failed to logs to discord")
}

c.JSON(http.StatusOK, view.CreateResponse[any](nil, nil, nil, nil, ""))
}
Expand Down
14 changes: 7 additions & 7 deletions pkg/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ func New(cfg *config.Config, store *store.Store, repo store.DBRepo) *Service {
Scopes: []string{"email", "profile"},
}

googleAuthSvc, err := googleauth.New(
authServiceCfg,
)
if err != nil {
logger.L.Error(err, "failed to init google auth")
}

gcsSvc, err := googlestorage.New(
cfg.Google.GCSBucketName,
cfg.Google.GCSProjectID,
Expand All @@ -77,13 +84,6 @@ func New(cfg *config.Config, store *store.Store, repo store.DBRepo) *Service {
logger.L.Error(err, "failed to init gcs")
}

googleAuthSvc, err := googleauth.New(
authServiceCfg,
)
if err != nil {
logger.L.Error(err, "failed to init google auth")
}

driveConfig := &oauth2.Config{
ClientID: cfg.Google.ClientID,
ClientSecret: cfg.Google.ClientSecret,
Expand Down

0 comments on commit c7a6ce5

Please sign in to comment.