Subject | Hash | Author | Date (UTC) |
---|---|---|---|
The router will now send the status code 404 if the supplied news id doesn't exist | 27c689c920082b6c97ce098d1774d460e87d220e | Eyad-Syrialover | 2019-07-02 22:24:09 |
Created simple news view to display content | fa1989d165eba0c2aab34880bbab34e260539999 | Eyad-Syrialover | 2019-07-02 22:19:12 |
Fixed some logical errors | 1ce43a42499dac183b5c9d61fcafeda49957a788 | Eyad-Syrialover | 2019-07-02 22:18:41 |
Changed the callback function syntax into a lambda expression | ee9932c054f23ecbff46a4922b5785ee377a5674 | Eyad-Syrialover | 2019-07-02 22:17:58 |
Switched all callback functions into a combination of promises and lambda expressions | 3bd4a3be48d091e57cdd208dd6a7b42fd7e92fcc | Eyad-Syrialover | 2019-07-02 22:17:08 |
Added news router | 13729daf161f670069082a3b04e255a572d79ec1 | Eyad-Syrialover | 2019-07-02 22:06:15 |
A file that contains a reference to MySQL connection | 7ab07ca7c8b71bc7983390c50dfdb4d9be430784 | Eyad-Syrialover | 2019-06-30 00:11:40 |
A dedicated file that contains database credentials | 4667094accb904263a548b4d8be5e63fa754565a | Eyad-Syrialover | 2019-06-30 00:10:56 |
Added SQL to create a database to store information | 38ffdd899a0661a74ed3e561a120ad3b4a26f590 | Eyad-Syrialover | 2019-06-30 00:10:18 |
Added the layout view which gives all other views consistent look | a7f328de8a743d4f797b783c0629d9b23943818a | Eyad-Syrialover | 2019-06-29 23:30:28 |
Added the index view | 5c42739ac6307469f5359e228f35b8dcf691cc65 | Eyad-Syrialover | 2019-06-29 23:29:59 |
Added head view which contains shared metadata between all views | 579afb2c9cd36138c0fa83ccd5197f1d9c7031ce | Eyad-Syrialover | 2019-06-29 23:29:43 |
Added error view to display error in formatted way | bc9cce79be8604c75552c625ab4c6925a5716472 | Eyad-Syrialover | 2019-06-29 23:29:12 |
Added the index router | b56dae5e53f2b66097097738b22a19daec2525c5 | Eyad-Syrialover | 2019-06-29 23:28:42 |
Added environment file | 131a260f3d3f5d12325eaabd610e587d06febb31 | Eyad-Syrialover | 2019-06-29 23:27:50 |
Added several dependencies | 37c6d78ba8dccd2a1283afd1704832107017cfdb | Eyad-Syrialover | 2019-06-29 23:24:34 |
Changed rendering engine from pug to ejs | 2c943981b7198244acf380d9cf91ea7bc791dc7a | Eyad-Syrialover | 2019-06-29 23:24:01 |
Fixed a typo | 91ddbb8be27a137673c37d0f3bf1df558133b806 | Eyad-Syrialover | 2019-06-29 22:53:45 |
Added package.json file | 956e9cb09b69f9d3a2ce25598029dc0fab736b4e | Eyad-Syrialover | 2019-06-29 22:53:17 |
Initial commit | c6ddf0e93aa68dd6da04514c1be992a5a3bf0115 | Eyad Mohammed Osama (Syrian Lucianos) | 2019-06-29 22:46:10 |
File | Lines added | Lines deleted |
---|---|---|
routes/news.js | 1 | 1 |
File routes/news.js changed (mode: 100644) (index 16ede23..1c1baf5) | |||
... | ... | router.get("/:id", [ | |
24 | 24 | let id = req.params.id; | let id = req.params.id; |
25 | 25 | News.NewsExist(id).then((value) => { | News.NewsExist(id).then((value) => { |
26 | 26 | if (value === false) { | if (value === false) { |
27 | res.send({ | ||
27 | res.status(404).send({ | ||
28 | 28 | message : "News not found" | message : "News not found" |
29 | 29 | }); | }); |
30 | 30 | } | } |