Skip to content

Commit

Permalink
条件修正・空行削除
Browse files Browse the repository at this point in the history
  • Loading branch information
Hueter57 committed Jun 28, 2024
1 parent 6ba3e9b commit 28fe9ee
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions service/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (

"github.com/google/uuid"
"github.com/labstack/echo/v4"

"github.com/samber/lo"
)

Expand Down Expand Up @@ -118,7 +117,7 @@ func WebhookEventHandler(c echo.Context, reqBody, resBody []byte) {
message += fmt.Sprintf("- 請求先グループ: %s", resApp.Group.Name) + "\n"
}

if resApp.Tags != nil && len(resApp.Tags) == 0 {
if resApp.Tags != nil && len(resApp.Tags) != 0 {

tags := lo.Map(resApp.Tags, func(tag *Tag, index int) string {
return tag.Name
Expand Down Expand Up @@ -161,7 +160,7 @@ func WebhookEventHandler(c echo.Context, reqBody, resBody []byte) {
if resApp.Group != nil {
message += fmt.Sprintf("- 関連するグループ: %s\n", resApp.Group.Name)
}
if resApp.Tags != nil && len(resApp.Tags) == 0 {
if resApp.Tags != nil && len(resApp.Tags) != 0 {
tags := lo.Map(resApp.Tags, func(tag *Tag, index int) string {
return tag.Name
})
Expand Down

0 comments on commit 28fe9ee

Please sign in to comment.