Created by: oblivisheee
This pull request includes significant changes to the subscription service, updates to the nginx and redis configurations, and modifications in the docker-compose.yaml file to improve network configuration and service management. The most important changes include adding new endpoints for buying and refunding subscriptions, enhancing error handling, and updating network configurations for better service isolation.
Subscription Service Enhancements:
- Added new endpoints for buying and refunding subscriptions in
subscription/src/interfaces.rs. ([[1]](diffhunk://#diff-56fcd6811a85bff329f8169cc3c85e50e1ba88be26f35efa5e10c4c329be45f5R291-R404),[[2]](diffhunk://#diff-56fcd6811a85bff329f8169cc3c85e50e1ba88be26f35efa5e10c4c329be45f5L291-L295)) - Introduced new error type
UserDoesntHaveSubscriptioninsubscription/src/errors.rsand updated error handling logic. ([[1]](diffhunk://#diff-acba79727c688e36908e78a576172a64138e7ffe4516718c354ebae2a33d85d4R97-R98),[[2]](diffhunk://#diff-acba79727c688e36908e78a576172a64138e7ffe4516718c354ebae2a33d85d4R127),[[3]](diffhunk://#diff-acba79727c688e36908e78a576172a64138e7ffe4516718c354ebae2a33d85d4R439-R450),[[4]](diffhunk://#diff-acba79727c688e36908e78a576172a64138e7ffe4516718c354ebae2a33d85d4R487)) - Updated
subscription/src/main.rsto register new endpoints and set up NATS communication client. ([[1]](diffhunk://#diff-776f6ae2e7025b4ef6540ea041eb12015c41a356c6ac0e0aa283e8db1d5855abR113-R114),[[2]](diffhunk://#diff-776f6ae2e7025b4ef6540ea041eb12015c41a356c6ac0e0aa283e8db1d5855abR123),[[3]](diffhunk://#diff-776f6ae2e7025b4ef6540ea041eb12015c41a356c6ac0e0aa283e8db1d5855abR134-R135)) - Added
buy_refundmodule insubscription/src/reqres.rsto handle request and response structures for new endpoints. ([subscription/src/reqres.rsR102-R139](diffhunk://#diff-cea359b9459d037961cc8f38f9d62bee71ad8f411893a8d8236622ca2b43a9e7R102-R139))
Configuration Updates:
- Added new locations for subscription-related endpoints in
conf/nginx.conf. ([conf/nginx.confR69-R84](diffhunk://#diff-8e371ad49c2a106a2f6b14d3cb01445c4f7d5c3694f50892d95932b48f42671cR69-R84)) - Updated
conf/redis.confto include comprehensive configuration settings for Redis. ([[1]](diffhunk://#diff-e336eed03fce57868891146755dc255fdc85fcf98ddc055291113b202ce66023R1-R107),[[2]](diffhunk://#diff-e336eed03fce57868891146755dc255fdc85fcf98ddc055291113b202ce66023R116-R120))
Docker Compose Modifications:
- Modified network configurations in
docker-compose.yamlto create separate networks fordbandlogs, improving service isolation. ([[1]](diffhunk://#diff-3fde9d1a396e140fefc7676e1bd237d67b6864552b6f45af1ebcc27bcd0bb6e9L36-R37),[[2]](diffhunk://#diff-3fde9d1a396e140fefc7676e1bd237d67b6864552b6f45af1ebcc27bcd0bb6e9L63-R65),[[3]](diffhunk://#diff-3fde9d1a396e140fefc7676e1bd237d67b6864552b6f45af1ebcc27bcd0bb6e9L79-R85),[[4]](diffhunk://#diff-3fde9d1a396e140fefc7676e1bd237d67b6864552b6f45af1ebcc27bcd0bb6e9L95-R99),[[5]](diffhunk://#diff-3fde9d1a396e140fefc7676e1bd237d67b6864552b6f45af1ebcc27bcd0bb6e9L108-R109),[[6]](diffhunk://#diff-3fde9d1a396e140fefc7676e1bd237d67b6864552b6f45af1ebcc27bcd0bb6e9L119-R119),[[7]](diffhunk://#diff-3fde9d1a396e140fefc7676e1bd237d67b6864552b6f45af1ebcc27bcd0bb6e9L153-R153),[[8]](diffhunk://#diff-3fde9d1a396e140fefc7676e1bd237d67b6864552b6f45af1ebcc27bcd0bb6e9L198-R201))