Skip to content

Commit

Permalink
Merge pull request #3 from orainmers/feature
Browse files Browse the repository at this point in the history
bug fix
  • Loading branch information
orainmers authored Mar 2, 2025
2 parents eb6d013 + ab1592d commit 769fb7d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 14 deletions.
2 changes: 1 addition & 1 deletion internal/web/ofederation/api.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/web/olegalentities/api.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 4 additions & 11 deletions internal/web/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,10 @@ func (a *Web) GetAllLegalEntities(ctx context.Context, request ofederation.GetAl
}
dtos := make([]ofederation.LegalEntityDTO, 0, len(entities))
for _, e := range entities {
eUUID := types.UUID(e.UUID)
name := e.Name
namePtr := &name // Приведение string к *string
created := e.CreatedAt
updated := e.UpdatedAt
deleted := e.DeletedAt
dtos = append(dtos, ofederation.LegalEntityDTO{
Uuid: &eUUID,
Name: namePtr,
CreatedAt: &created,
UpdatedAt: &updated,
DeletedAt: deleted,
Uuid: &e.UUID,

Check failure on line 85 in internal/web/web.go

View workflow job for this annotation

GitHub Actions / Linting

G601: Implicit memory aliasing in for loop. (gosec)

Check failure on line 85 in internal/web/web.go

View workflow job for this annotation

GitHub Actions / Linting

exporting a pointer for the loop variable e (exportloopref)
Name: &e.Name,

Check failure on line 86 in internal/web/web.go

View workflow job for this annotation

GitHub Actions / Linting

G601: Implicit memory aliasing in for loop. (gosec)

Check failure on line 86 in internal/web/web.go

View workflow job for this annotation

GitHub Actions / Linting

exporting a pointer for the loop variable e (exportloopref)
// Исключаем deleted_at
})
}
return ofederation.GetAllLegalEntities200JSONResponse(dtos), nil
Expand All @@ -111,6 +103,7 @@ func (a *Web) UpdateLegalEntity(ctx context.Context, request ofederation.UpdateL
return &ofederation.UpdateLegalEntity200JSONResponse{
Uuid: &uuidValue,
Name: newNamePtr,
// Исключаем deleted_at
}, nil
}

Expand Down
1 change: 0 additions & 1 deletion openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3486,7 +3486,6 @@ components:
deleted_at:
type: string
format: date-time
nullable: true

CreateLegalEntityRequest:
type: object
Expand Down

0 comments on commit 769fb7d

Please sign in to comment.