Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fx: change the logic for fetching activity logs #816

Merged
merged 9 commits into from
May 23, 2024

Conversation

khalifan-kfan
Copy link
Collaborator

Description

This PR is to change the base URL for activity logs to the new microservice URL

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Trello Ticket ID

https://trello.com/c/Gazjtbbq

How Can This Been Tested?

Run this application and add the environment variable
REACT_APP_ACTIVITY_LOGS_API_URL that should be the base URL to the new app logger activities

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

@@ -0,0 +1,28 @@
import axios from "axios";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: require() of ES Module /usr/local/node_modules/eslint/node_modules/eslint-scope/lib/definition.js from /usr/local/node_modules/babel-eslint/lib/require-from-eslint.js not supported.
Instead change the require of definition.js in /usr/local/node_modules/babel-eslint/lib/require-from-eslint.js to a dynamic import() which is available in all CommonJS modules.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, @khalifan-kfan, instead of creating a new file and creating duplicate code, try to do something I did in the same axios file here

@Mubangizi
Copy link
Collaborator

Hey Khalifan, let us merge into microservice branch not develop

Copy link
Collaborator

@Mubangizi Mubangizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @khalifan-kfan, maybe a few things to modify

@@ -0,0 +1,28 @@
import axios from "axios";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, @khalifan-kfan, instead of creating a new file and creating duplicate code, try to do something I did in the same axios file here

}

return axios
console.log(ACTIVITY_LOGS_API_URL)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if this console logger is needed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice refactor @Mubangizi , this has been added, thank you

Copy link

codeclimate bot commented May 23, 2024

Code Climate has analyzed commit 6db10bf and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 41.3% (70% is the threshold).

This pull request will bring the total coverage in the repository to 35.4% (0.1% change).

View more on Code Climate.

@khalifan-kfan khalifan-kfan changed the base branch from develop to microservice May 23, 2024 07:46
@khalifan-kfan khalifan-kfan merged commit 8e355e3 into microservice May 23, 2024
2 checks passed
@khalifan-kfan khalifan-kfan deleted the fx-activties-url branch May 23, 2024 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants