crex424 / EasyAppointmentManager

A website to keep track and manage appointments of varying types such as Dentist, Doctor, and Neurologist appointments.
1 stars 1 forks source link

Campbell issue#97 implement weather API #98

Closed crex424 closed 1 year ago

crex424 commented 1 year ago

Closes #97 I have implemented a weather API for our home index page.

This is the weather API source website: https://www.visualcrossing.com/

TungKimProgrammer commented 1 year ago

Do you think we should set it to show publicly since there's no secret needed to hide? When we keep the key in the secrets.json, the Users can't see it. It did not display anything on my end while testing your branch until I created my own key. When I tried moving the key from secrets.json to appsettings.json, it showed publicly.

crex424 commented 1 year ago

What did you name the key in the secrets file. If you check appsettings.json you will see what I named mine. I think if you name yours similarly in the secret.json it should work with the code I have created to use the key without showing it outside of the secret.json.

TungKimProgrammer commented 1 year ago

I created mine key and named the key the same as yours. It works. What I mean is when we keep the key in the secret file, the users will not be able to see the widget, correct me if I am wrong. In appsetting.json, I added

"VisualCrossingPublicKey": "the key I created"

since the key to the weather forecast is not sensitive, and I edited this:

ViewBag.apiKey = _config["VisualCrossingPublicKey"];

it displayed publicly.