Closed emoss08 closed 1 month ago
This pull request primarily focuses on enhancing the 'Commodity' model by changing the 'Status' field type to 'property.Status' and adding corresponding tests. It also introduces 'encryptcookie' middleware in the API router, with necessary configuration changes. Additionally, it ensures that indexes in the migration script are created only if they do not already exist.
Files | Changes |
---|---|
pkg/models/commodity.go internal/api/services/commodity.service_test.go |
Updated 'Commodity' model to use 'property.Status' type and added tests for 'CommodityService'. |
internal/api/router/router.go config/server_config.go |
Added 'encryptcookie' middleware and corresponding 'SecretKey' configuration. |
migrate/migrations/20240621160242_table_change_alerts.tx.up.sql |
Ensured indexes are created only if they do not already exist. |
Summary by Sourcery
This pull request includes enhancements to the Commodity model, updates to the API router for cookie encryption, improvements to SQL migration scripts, and the addition of new tests for the Commodity service. Minor documentation formatting changes were also made.