-
Notifications
You must be signed in to change notification settings - Fork 203
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
Related to delete link feature #352
Comments
i do like to contribute to contribute to on this issue , i can learn new thing's i will start work on it if u assign this to me |
Sure, go ahead! |
Hello @muke1908 , I have a question regarding the use of backend URLs in the .env file. I understand that it's common practice to store the backend URL as an environment variable, like BACKEND_URL, and use it in the code. I recently made some changes to the backend, including creating a new method in the service and defining it in sdk.ts and types.tsx. However, when I try to use this method in the frontend, I encounter an error stating that the method is not defined in the IChatE2EE class. I have run npm run build-service-sdk after making these changes, but the issue persists. Additionally, I noticed that when sending a request to the backend URL directly, like http://localhost:3001/api/chat-link/status/4bf42961-e3cf-469a-9ae6-dea5b66d2fcf, it behaves as expected. This makes me wonder if it's more practical to continue using the backend URL directly in the client rather than modifying the service folder. If you want to add the isLinkValid function to the service folder, could you please guide me on how to properly export this function? For now, my proposed solution is to add the backend URL to the .env.sample file and make requests directly to the backend. Should I proceed with this approach, or is there a better method to resolve this issue? if you want to add the memener function isLinnkValid in the service folder please guide me how to export the function . please reply my solution is add a backend url in .env.samle file then make a request to backend as your api of valid status is not made a member function of IChatE2EE class .so i will add this url backend request and push the code shall i ? i hope u r happy with my solution , if u have any other solution please inform me ..!! |
@chandankumarm55 Did you add the new methods in declaration file as well? types https://github.com/muke1908/chat-e2ee/blob/master/service/src/public/types.ts |
@muke1908 if your ok then we will easly fix with using backend URL and sending the request for url at http://localhost:3001/api/chat-link/status/${channelID} we can improve this api at backend then we can easy fix this issue . if your ok i will create a PR. |
@chandankumarm55 I did not understand what you mean by using "backend URL" To resolve the other issue (method not found), you can try: |
@muke1908 When we start this application locally, the frontend runs on localhost:3000 and the backend server runs on localhost:3001. So, these are the URLs we use for running the app locally, correct? I noticed that after deploying the app, the frontend is running at https://chat-e2ee-2.azurewebsites.net/. Additionally, when we send requests to the backend, I see in the network tab that we're hitting the backend at the same URL: https://chat-e2ee-2.azurewebsites.net. Since both the frontend and backend are using the same URL after deployment, would it be correct to assume that if we hit the API http://chat-e2ee-2.azurewebsites.net/api/chat-link/status/${channelID} every time the user component changes, we can trigger this API call and exit? so if we had this url (we can add .env file ) and fetch the data every time if it return false then it will move both user to / route |
i have tested the production mode api also if the link is not valid then it return the below response if the link is valid then it return as so we need to improve the api returning status correctly at the backend that is db folder . so i have improved also locally but for production model only u need create a .env file and add the key pair as BACKEND_URL = https://chat-e2ee-2.azurewebsites.net/ . it is enough . can i create a PR now . i think u understand . and i also i need to ask to show the component in front end . should i add component for showing that any one of you deleted a link or make a alert message . file 's to be changed are - client/src/pages/messaging/index.js and .env and backend = backend/api/chatLink/index.js |
@chandankumarm55 yes, please create a PR |
Problem:
Solution:
The text was updated successfully, but these errors were encountered: