-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathUntitled2
More file actions
24 lines (15 loc) · 714 Bytes
/
Untitled2
File metadata and controls
24 lines (15 loc) · 714 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
Orline Cacayan | ORLINE_CACAYAN@TTX.COM |
Kendall Zettlmeier | KENDALL.ZETTLMEIER@TTX.COM |
Jacqueline Dukes | JACQUELINE.DUKES@TTX.COM |
Rich Rousseau
app.post('/addTrain', function(req,res){
var sql = `
INSERT INTO trains (name,inService,numberOfAvailable)
VALUES ('${req.body.nameOfTrain}', '${req.body.inService}', '${req.body.availableTrains}');
`;
database.executeQuery(sql);
console.log('posted to /addTrain');
console.log(JSON.stringify(req.body));
return res.send("success");
});