Skip to content

Commit

Permalink
Fixed bug with get transactions command
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmad45123 committed May 14, 2024
1 parent 3cbcf6e commit a7d4651
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class GetWalletTransactionsCommand

@Override
public GetWalletTransactionsResponse Run(GetWalletTransactionsRequest request) {
if (getWalletRepository().existsById(request.getFreelancerId())) {
if (!getWalletRepository().existsById(request.getFreelancerId())) {
return GetWalletTransactionsResponse.builder()
.withStatusCode(HttpStatusCode.BAD_REQUEST)
.withErrorMessage("Wallet does not exist")
Expand Down
7 changes: 6 additions & 1 deletion services/payments/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ spring.application.name=payments
spring.datasource.url=${PAYMENTS_DB_URL}
spring.datasource.username=payments_user
spring.datasource.password=payments_password
spring.jpa.hibernate.ddl-auto=create-drop
spring.jpa.hibernate.ddl-auto=create-only
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.properties.hibernate.format_sql=true
Expand All @@ -14,3 +14,8 @@ spring.rabbitmq.username=guest
spring.rabbitmq.password=guest

logging.level.root=INFO

spring.cache.type=redis
spring.cache.host=service_redis
spring.cache.port=6379
spring.cache.redis.time-to-live=600000

0 comments on commit a7d4651

Please sign in to comment.