Skip to content

Commit ceff48d

Browse files
add
1 parent ff581d9 commit ceff48d

File tree

5 files changed

+12
-1
lines changed

5 files changed

+12
-1
lines changed

app/company/create.go

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ func (ctrl *Controller) Create(c *gin.Context) {
3838
return
3939
}
4040

41+
span.LogKV("Input Handler", input)
42+
4143
ID, err := ctrl.service.Create(ctx, input)
4244
if err != nil {
4345
view.MakeErrResp(c, err)

app/company/delete.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@ func (ctrl *Controller) Delete(c *gin.Context) {
3434
defer span.Finish()
3535

3636
input := &companyin.DeleteInput{
37-
ID: c.Param("id"),
37+
ID: c.Param("id"),
3838
}
3939

40+
span.LogKV("Input Handler", input)
41+
4042
err := ctrl.service.Delete(ctx, input)
4143
if err != nil {
4244
view.MakeErrResp(c, err)

app/company/list.go

+2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ func (ctrl *Controller) List(c *gin.Context) {
4242
input.Sorts = append(input.Sorts, "createdAt:desc")
4343
}
4444

45+
span.LogKV("Input Handler", input)
46+
4547
total, items, err := ctrl.service.List(ctx, input)
4648
if err != nil {
4749
view.MakeErrResp(c, err)

app/company/read.go

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ func (ctrl *Controller) Read(c *gin.Context) {
3333

3434
input := &companyin.ReadInput{CompanyID: c.Param("id")}
3535

36+
span.LogKV("Input Handler", input)
37+
3638
company, err := ctrl.service.Read(ctx, input)
3739
if err != nil {
3840
view.MakeErrResp(c, err)

app/company/update.go

+3
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,13 @@ func (ctrl *Controller) Update(c *gin.Context) {
4040
input := &companyin.UpdateInput{
4141
ID: c.Param("id"),
4242
}
43+
4344
if err := c.ShouldBindJSON(input); err != nil {
4445
view.MakeErrResp(c, err)
4546
return
4647
}
48+
49+
span.LogKV("Input Handler", input)
4750

4851
err := ctrl.service.Update(ctx, input)
4952
if err != nil {

0 commit comments

Comments
 (0)