Skip to content

[CGCP] [Milestone] [Code Cleanup] All services require code cleanup in certain places #30

@chinmoy12c

Description

@chinmoy12c

This is a part of the milestones: samagra-comms/uci-apis#159

There are places where a proper code paradigm is not followed, such as dependency injection, and certain places where the components are strongly coupled, making testing them difficult. This ticket tracks all these code changes that are required, individual tickets should be filed for each of these issues. This issue will be a long running thread and will be updated as and when we find code that needs to be cleaned up.

  • NewNetcoreService needs to be fetched using dependency injection instead of using getInstance and actually creating an instance using the new keyword.
  • All the services using NetcoreWhatsapp currently manually set some of the fields like FileCdn etc. We need to autoconfigure those.
  • Currently, the RedisCache change to remove @AllArgsConstructor was rolled back due to null pointer exceptions. We need to pinpoint the point of failure and fix this.
  • Return BadRequestError when both botId and userId are not provided in the history API.
  • Handle cases in which start date and end date are not provided in history API.

Product Name

UCI

Organization Name:

Samagra

Domain

Communications

Tech Skills Needed:

Java, SpringBoot

Mentor(s)

@chinmoy12c

Complexity

Medium

Category

Code Cleanup

Sub Category

API, Backend, Technical Debt.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions