Skip to content

Day12#32

Open
hiten-katariya wants to merge 7 commits into
spytro26:mainfrom
hiten-katariya:Day12
Open

Day12#32
hiten-katariya wants to merge 7 commits into
spytro26:mainfrom
hiten-katariya:Day12

Conversation

@hiten-katariya
Copy link
Copy Markdown

No description provided.

Copilot AI review requested due to automatic review settings June 2, 2026 04:59
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/assignment Node script reading a file and calling an external API.
  • Extended day12/back/index.js with 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 thread day12/back/index.js
Comment on lines +195 to +197
if(amount > sender.balance){
return res.json({message : "insufficent money"});
}
Comment thread day12/back/index.js
Comment on lines 232 to +234
app.get("/userDetails" , (req , res)=>{
const {id} = req.body;
const user = users.find((u) => u.id == id);
Comment thread day12/back/index.js
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 thread day12/back/index.js
Comment on lines +268 to +273
if(password){
if(password.length < 8){
return res.status(400).json({message : "weak password"});
}
user.password = password;
}
Comment thread day12/back/index.js

const users = [] ;
const loginedUsers = [];
const transactionHistory = [];
Comment thread day12/back/index.js

return res.json({message : "money transfered"});
if(amount > sender.balance){
return res.json({message : "insufficent money"});
Comment thread day12/back/index.js
at: new Date().toISOString()
});

return res.json({message : "money transfered"});
Comment thread Day 4/script.js
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants