Skip to content

Commit

Permalink
Merge pull request #520 from LerianStudio/feature/MIDAZ-516
Browse files Browse the repository at this point in the history
Feature/MIDAZ-516
  • Loading branch information
MartinezAvellan authored Feb 18, 2025
2 parents d089597 + c460707 commit 6280ef7
Show file tree
Hide file tree
Showing 55 changed files with 3,588 additions and 298 deletions.
4 changes: 2 additions & 2 deletions components/audit/api/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const docTemplate = `{
{
"type": "string",
"description": "Request ID",
"name": "Midaz-Id",
"name": "X-Request-Id",
"in": "header"
},
{
Expand Down Expand Up @@ -100,7 +100,7 @@ const docTemplate = `{
{
"type": "string",
"description": "Request ID",
"name": "Midaz-Id",
"name": "X-Request-Id",
"in": "header"
},
{
Expand Down
4 changes: 2 additions & 2 deletions components/audit/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ paths:
type: string
- description: Request ID
in: header
name: Midaz-Id
name: X-Request-Id
schema:
type: string
- description: Organization ID
Expand Down Expand Up @@ -68,7 +68,7 @@ paths:
type: string
- description: Request ID
in: header
name: Midaz-Id
name: X-Request-Id
schema:
type: string
- description: Organization ID
Expand Down
4 changes: 2 additions & 2 deletions components/audit/api/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
{
"type": "string",
"description": "Request ID",
"name": "Midaz-Id",
"name": "X-Request-Id",
"in": "header"
},
{
Expand Down Expand Up @@ -94,7 +94,7 @@
{
"type": "string",
"description": "Request ID",
"name": "Midaz-Id",
"name": "X-Request-Id",
"in": "header"
},
{
Expand Down
4 changes: 2 additions & 2 deletions components/audit/api/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ paths:
type: string
- description: Request ID
in: header
name: Midaz-Id
name: X-Request-Id
type: string
- description: Organization ID
in: path
Expand Down Expand Up @@ -94,7 +94,7 @@ paths:
type: string
- description: Request ID
in: header
name: Midaz-Id
name: X-Request-Id
type: string
- description: Organization ID
in: path
Expand Down
4 changes: 2 additions & 2 deletions components/audit/internal/adapters/http/in/trillian.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type TrillianHandler struct {
// @Tags Audit
// @Produce json
// @Param Authorization header string true "Authorization Bearer Token"
// @Param Midaz-Id header string false "Request ID"
// @Param X-Request-Id header string false "Request ID"
// @Param organization_id path string true "Organization ID"
// @Param ledger_id path string true "Ledger ID"
// @Param audit_id path string true "Audit ID"
Expand Down Expand Up @@ -84,7 +84,7 @@ func (th *TrillianHandler) AuditLogs(c *fiber.Ctx) error {
// @Tags Audit
// @Produce json
// @Param Authorization header string true "Authorization Bearer Token"
// @Param Midaz-Id header string false "Request ID"
// @Param X-Request-Id header string false "Request ID"
// @Param organization_id path string true "Organization ID"
// @Param ledger_id path string true "Ledger ID"
// @Param audit_id path string true "Audit ID"
Expand Down
5 changes: 5 additions & 0 deletions components/auth/setup/00_init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ INSERT INTO "casbin_lerian_enforcer_rule" ("ptype", "v0", "v1", "v2", "v3", "v4"
('p', 'developer_role', 'operation', 'get', '', '', ''),
('p', 'developer_role', 'operation', 'patch', '', '', ''),
('p', 'developer_role', 'operation', 'put', '', '', ''),
('p', 'developer_role', 'balance', 'post', '', '', ''),
('p', 'developer_role', 'balance', 'get', '', '', ''),
('p', 'developer_role', 'balance', 'patch', '', '', ''),
('p', 'developer_role', 'balance', 'put', '', '', ''),
('p', 'developer_role', 'asset-rate', 'put', '', '', ''),
('p', 'developer_role', 'asset-rate', 'get', '', '', ''),
('p', 'user_role', 'organization', 'get', '', '', ''),
Expand All @@ -74,6 +78,7 @@ INSERT INTO "casbin_lerian_enforcer_rule" ("ptype", "v0", "v1", "v2", "v3", "v4"
('p', 'user_role', 'account', 'get', '', '', ''),
('p', 'user_role', 'transaction', 'get', '', '', ''),
('p', 'user_role', 'operation', 'get', '', '', ''),
('p', 'user_role', 'balance', 'get', '', '', ''),
('p', 'user_role', 'asset-rate', 'get', '', '', ''),
('p', 'grpc_role', 'account.AccountProto', '*', '', '', ''),
('p', 'auditor_role', 'audit', 'get', '', '', '');
2 changes: 2 additions & 0 deletions components/auth/setup/init_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,7 @@
"segment",
"transaction",
"operation",
"balance",
"asset-rate"
],
"actions": [
Expand Down Expand Up @@ -882,6 +883,7 @@
"segment",
"transaction",
"operation",
"balance",
"asset-rate"
],
"actions": [
Expand Down
2 changes: 1 addition & 1 deletion components/mdz/internal/rest/organization_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func TestOrganizationGetByID(t *testing.T) {
func TestOrganizationUpdate(t *testing.T) {
inp := mmodel.UpdateOrganizationInput{
LegalName: "Corwin LLC",
DoingBusinessAs: ptr.StringPtr("The ledger.io"),
DoingBusinessAs: "The ledger.io",
Status: mmodel.Status{
Code: "ACTIVE",
Description: ptr.StringPtr("Teste Ledger"),
Expand Down
2 changes: 1 addition & 1 deletion components/mdz/pkg/cmd/organization/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func (f *factoryOrganizationUpdate) UpdateRequestFromFlags(org *mmodel.UpdateOrg
return err
}

org.DoingBusinessAs = &doingBusinessAsPtr
org.DoingBusinessAs = doingBusinessAsPtr

org.Status.Code = f.Code
org.Status.Description = utils.AssignOptionalStringPtr(f.Description)
Expand Down
Loading

0 comments on commit 6280ef7

Please sign in to comment.