Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

[$40] Resume link support token with redirect #492

Closed
@maxceem

Description

@maxceem

background

We have a page where we are showing Job Candidate resume link https://platform.topcoder-dev.com/taas/myteams/18361/positions/684d1d9b-32b5-4e0c-bb2c-e031db694c75/candidates/to-review

image

This is some third-party link, when we click it, the download is started.

Though we need to track when user downloads this resume. For this purpose we implemented a special endpoint ${config.API.V5}/jobCandidates/{jobCandidateId}/resume which should be called using user token as all other endpoints. This endpoint would internally track this call and redirect to the real third-party resume URL.

We cannot just replace URL in this link to the ${config.API.V5}/jobCandidates/{jobCandidateId}/resume because we also have to pass JWT token in the header.

Task

We have to update this link so it works like this:

  • it should not be a real link so user cannot copy it or open it in a new window
  • it should still look like a link, and when we click it it should internally call endpoint ${config.API.V5}/jobCandidates/{jobCandidateId}/resume get the URL where this endpoint redirected and open that URL in a new window.
  • NOTE: that this link should be only visible if resume is not null as it's done now
  • axios looks like support disabling redirects Fixing #211 axios/axios#307, so the logic could be like this:
    • using axios get URL ${config.API.V5}/jobCandidates/{jobCandidateId}/resume
    • disalbe redirects to avoid downloading of actual resume
    • get the URL where it was redirected to and open in a new tab/window

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions