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

Actual Date needed #6

Open
Gautam-Arora24 opened this issue Oct 7, 2020 · 22 comments
Open

Actual Date needed #6

Gautam-Arora24 opened this issue Oct 7, 2020 · 22 comments
Labels

Comments

@Gautam-Arora24
Copy link
Owner

I want actual date to be added when a teacher posts in the announcement section.

@twaaaadahardeep
Copy link

Hi, I can take this up!

@Gautam-Arora24
Copy link
Owner Author

Sure, Go ahead

@Gautam-Arora24
Copy link
Owner Author

Also I am making a new branch. You should make a PR (incase you want) in that new branch and not on master

@twaaaadahardeep
Copy link

OK, will keep in mind.

Also, can I suggest using an env variable to send API requests? I noticed that the Heroku links were hardcoded in the client side which made the task of changing the links to my localhost very laborious. Thoughts?

@Gautam-Arora24
Copy link
Owner Author

Ya... I too think the same. If you want you could do so

@twaaaadahardeep
Copy link

I already put in a Pull Request.

@Gautam-Arora24
Copy link
Owner Author

Screenshot 2020-10-08 at 12 30 16 AM

Why this error is showing when I try to run my backend server ?

@twaaaadahardeep
Copy link

I think you need to use npm install. Let me know if it works.
Also, use it inside client. I added client/node_modules in .gitignore

@twaaaadahardeep
Copy link

If that doesn't work then delete node_modules and package-lock.json and run npm install again. Sorry for the mess.

@Gautam-Arora24
Copy link
Owner Author

No worries. I will install it again tomorrow and will inform you.

@twaaaadahardeep
Copy link

OK, be sure to let me know if the problem persists.

@Gautam-Arora24
Copy link
Owner Author

Ok

@Gautam-Arora24
Copy link
Owner Author

Screenshot 2020-10-08 at 2 27 59 PM

The data has not been added yet. Kindly look at this

@twaaaadahardeep
Copy link

This was the same output when I ran the server locally with API requests to Heroku. If you are testing on a local server, check if you're making the requests to your local backend server. Set the env MONGODB_URI variable to the local database too.

If you have pushed the code, then check if the database has updated with the timestamps.

@Gautam-Arora24
Copy link
Owner Author

I tried by pushing the code to heroku but the database was still not populated with timestamps field

@twaaaadahardeep
Copy link

I would suggest you to check it locally once so that we know it's not the code that is causing an issue.

@Gautam-Arora24
Copy link
Owner Author

I tried it locally but same problem persists

@Gautam-Arora24
Copy link
Owner Author

Although I am getting updatedAt value in my MongoDB

@twaaaadahardeep
Copy link

Is it showing Invalid DateTime in both the Dashboard and Announcement tabs?

@Gautam-Arora24
Copy link
Owner Author

Yes

@twaaaadahardeep
Copy link

The code inside the Repo looks fine to me. Try printing the object data here and here. You'll get a better look at what's happening.

@Gautam-Arora24
Copy link
Owner Author

Sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants