Skip to content

[Clean Code] Remove Redundant RxJS map(res => res) Mappings in CzentrixService #173

Description

@rohansaini-02

Context

While auditing the integration layer, I noticed redundant observable mapping operators inside czentrix.service.ts.

Problem

Several HTTP methods pipe their POST calls into map(res => res). Since Angular's standard HttpClient already resolves and returns the parsed JSON response body automatically, this identity mapping is a no-op that adds unnecessary boilerplate and reduces readability.

Proposed Change

  • Remove redundant .pipe(map(res => res)) statements.
  • Keep existing error handling (catchError) intact.
  • Ensure no changes to response structure or method signatures occur.

Affected Areas

  • File: v19/src/app/core/services/czentrix.service.ts
  • Methods: getAgentStatus(), getCallDetails(), manualDial(), userLogout()

Deliverables / Checklist

  • Remove redundant observable mappings from czentrix.service.ts
  • Verify build passes successfully without warnings
  • Ensure no service regressions occur during runtime execution

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions