Day12#32
Open
hiten-katariya wants to merge 7 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds several day-based assignments: an async Node script demo, basic frontend pages, and expanded Express backend “banking” endpoints with transaction history.
Changes:
- Added
day3/assignmentNode script reading a file and calling an external API. - Extended
day12/back/index.jswith transaction history tracking, user details endpoints, and improved transfer/credit/debit validation. - Added frontend UI assets: a login page + styles, and a simple DOM-based todo app.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| day3/assignment/solution.js | Adds async file read + sleep + fetch demo. |
| day3/assignment/h.txt | Adds sample text file used by the Node script. |
| day12/back/index.js | Implements transaction history and adds/updates user and money movement endpoints. |
| aasigment hiten katariya/style.css | Adds styling for the login page UI. |
| aasigment hiten katariya/assigment.html | Adds a static login page layout. |
| Day 4/script.js | Adds JS to append todo items to the DOM. |
| Day 4/index.html | Adds a simple todo app page with inline styling. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1
to
+13
| import fs from "fs/promises"; | ||
|
|
||
| const sleep = (ms) => new Promise(r => setTimeout(r, ms)); | ||
|
|
||
| async function run() { | ||
| try { | ||
| const data = await fs.readFile("h.txt", "utf-8"); | ||
| console.log(data); | ||
|
|
||
| await sleep(1000); | ||
|
|
||
| const res = await fetch("https://jsonplaceholder.typicode.com/todos/1"); | ||
| console.log(await res.json()); |
Comment on lines
+195
to
+197
| if(amount > sender.balance){ | ||
| return res.json({message : "insufficent money"}); | ||
| } |
Comment on lines
232
to
+234
| app.get("/userDetails" , (req , res)=>{ | ||
| const {id} = req.body; | ||
| const user = users.find((u) => u.id == id); |
Comment on lines
246
to
+248
| app.post("/userDetails" , (req , res)=>{ | ||
| const {id , name , username , phone , password} = req.body; | ||
| const user = users.find((u) => u.id == id); |
Comment on lines
+268
to
+273
| if(password){ | ||
| if(password.length < 8){ | ||
| return res.status(400).json({message : "weak password"}); | ||
| } | ||
| user.password = password; | ||
| } |
|
|
||
| const users = [] ; | ||
| const loginedUsers = []; | ||
| const transactionHistory = []; |
|
|
||
| return res.json({message : "money transfered"}); | ||
| if(amount > sender.balance){ | ||
| return res.json({message : "insufficent money"}); |
| at: new Date().toISOString() | ||
| }); | ||
|
|
||
| return res.json({message : "money transfered"}); |
Comment on lines
+5
to
+14
| button.addEventListener("click", function() { | ||
| let text = input.value; | ||
|
|
||
| let item = document.createElement("li"); | ||
| item.textContent = text; | ||
|
|
||
| list.appendChild(item); | ||
|
|
||
| input.value = ""; | ||
| }); No newline at end of file |
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.