NW6| Zeliha Pala| [TECH ED] JavaScript Challenges | Week-3#14
Open
zelihapala wants to merge 7 commits intoCodeYourFuture:masterfrom
Open
NW6| Zeliha Pala| [TECH ED] JavaScript Challenges | Week-3#14zelihapala wants to merge 7 commits intoCodeYourFuture:masterfrom
zelihapala wants to merge 7 commits intoCodeYourFuture:masterfrom
Conversation
musayuksel
reviewed
Mar 21, 2024
Comment on lines
+1
to
+2
| OpenWeather API Key: 6d0fbc92848b733471a1093b6ce30a2a | ||
| Unsplash Access Key: ZN0G43FIimsZIYP8Duic-99-R8mkuVHJUSr9mVtThJY |
There was a problem hiding this comment.
Just a quick heads up – it's important NOT to commit API keys or any sensitive information directly into the codebase. You can use .env file for them. https://www.codementor.io/@parthibakumarmurugesan/what-is-env-how-to-set-up-and-run-a-env-file-in-node-1pnyxw9yxj
Comment on lines
+177
to
+178
| font-size: 14px; /* Tüm form elemanlarının yazı boyutunu büyütür */ | ||
| /* İhtiyacınıza göre diğer özellikler ekleyebilirsiniz */ |
| @@ -0,0 +1,93 @@ | |||
| const openWeatherAPIKey = "6d0fbc92848b733471a1093b6ce30a2a"; | |||
Comment on lines
+3
to
+13
| try { | ||
| const response = await fetch( | ||
| `https://api.openweathermap.org/data/2.5/weather?q=${city}&appid=${openWeatherAPIKey}` | ||
| ); | ||
| const data = await response.json(); | ||
| return data; | ||
| } catch (error) { | ||
| console.error("Weather data error:", error); | ||
| throw error; | ||
| } | ||
| }; |
There was a problem hiding this comment.
Well done, great usage of async await with try/catch
| } | ||
| }; | ||
|
|
||
| const unsplashAccessKey = "ZN0G43FIimsZIYP8Duic-99-R8mkuVHJUSr9mVtThJY"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.