Produced by Araxis Merge on 4/2/2019 1:07:33 PM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
# | Location | File | Last Modified |
---|---|---|---|
1 | C:\AraxisMergeCompare\Pri_un\ARS_Frontend\ars-app\fpps-app-server\server\routes\tools\stationMaintenance | addStation.js | Wed Mar 27 19:20:30 2019 UTC |
2 | C:\AraxisMergeCompare\Pri_re\ARS_Frontend\ars-app\fpps-app-server\server\routes\tools\stationMaintenance | addStation.js | Fri Mar 29 17:55:30 2019 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 248 |
Changed | 1 | 4 |
Inserted | 0 | 0 |
Removed | 0 | 0 |
Whitespace | |
---|---|
Character case | Differences in character case are significant |
Line endings | Differences in line endings (CR and LF characters) are ignored |
CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
1 | const expr ess = requ ire("expre ss"); | |
2 | const rout er = expre ss.Router( ); | |
3 | const rest = require ("../../.. /rest/rest "); | |
4 | ||
5 | router.get ("/visns", (req, res ) => { | |
6 | rest | |
7 | .getRe source(pro cess.env.E ND_POINT_B ASE_URI + process.en v.GET_VISN S, {}) | |
8 | .then( data => { | |
9 | res. status(dat a.response .statusCod e).json(da ta.respons eBody); | |
10 | }); | |
11 | }); | |
12 | ||
13 | router.get ("/types", (req, res ) => { | |
14 | rest | |
15 | .getRe source( | |
16 | proc ess.env.EN D_POINT_BA SE_URI + p rocess.env .FACILITY_ TYPES, | |
17 | {} | |
18 | ) | |
19 | .then( data => { | |
20 | res. status(dat a.response .statusCod e).json(da ta.respons eBody); | |
21 | }); | |
22 | }); | |
23 | ||
24 | router.pos t("/", (re q, res) => { | |
25 | rest | |
26 | .getRe source( | |
27 | proc ess.env.EN D_POINT_BA SE_URI + | |
28 | pr ocess.env. CHECK_STAT ION_EXISTS + | |
29 | `$ {station}` | |
30 | ) | |
31 | .then( data => { | |
32 | res. status(dat a.response .statusCod e).json(da ta.respons eBody); | |
33 | }); | |
34 | }); | |
35 | ||
36 | ||
37 | router.pos t("/addFac ility", (r eq, res) = > { | |
38 | rest | |
39 | .postR esource( | |
40 | proc ess.env.EN D_POINT_BA SE_URI + process.en v.ADD_FACI LITY, | |
41 | req. body.body | |
42 | ) | |
43 | .then( data => { | |
44 | res. status(dat a.response .statusCod e).json(da ta.respons eBody); | |
45 | }); | |
46 | }); | |
47 | ||
48 | // router. post("/add Facility", (req, res ) => { | |
49 | // va r requestD ata = req. body.body; | |
50 | // ge tAccessTok en( | |
51 | // proc ess.env.EN D_POINT_BA SE_URI + p rocess.env .TOKEN_REQ UEST | |
52 | // ). then(respo nse => { | |
53 | // acce ss_token = "Bearer " + respons e["access_ token"]; | |
54 | // // c onsole.log ("Inside n ode"); | |
55 | // getR esource( | |
56 | // access _token, | |
57 | // proces s.env.END_ POINT_BASE _URI + pro cess.env.A DD_FACILIT Y, | |
58 | // reques tData | |
59 | // ).th en(respons e => { | |
60 | // respon se.toStrin g("utf-8") ; | |
61 | // res.st atus(data. response.s tatusCode) .json(resp onse); | |
62 | // }); | |
63 | // }) ; | |
64 | // }); | |
65 | ||
66 | // this re st call re turns a bo olean if a particula r station was previo usly creat ed. | |
67 | router.get ("/station Check/:sta tion", (re q, res) => { | |
68 | const st ation = re q.params.s tation; | |
69 | rest | |
70 | .getRe source( | |
71 | proc ess.env.EN D_POINT_BA SE_URI + | |
72 | pr ocess.env. CHECK_STAT ION_EXISTS + | |
73 | `$ {station}` | |
74 | ) | |
75 | .then( data => re s.status(d ata.respon se.statusC ode).json( data.respo nseBody)); | |
76 | }); | |
77 | ||
78 | // functio n getAcces sToken(url ) { | |
79 | // let f ullAuthent ication = "Basic " + btoa(user name + ":" + passwor d); | |
80 | // let a rgs = { | |
81 | // par ameters: { | |
82 | // g rant_type: "password ", | |
83 | // username: " AI ", | |
84 | // password: " AI " | |
85 | // }, | |
86 | // hea ders: { | |
87 | // A uthorizati on: fullAu thenticati on, | |
88 | // " Content-Ty pe": "appl ication/js on" | |
89 | // } | |
90 | // }; | |
91 | ||
92 | // let m akeRestCal l = functi on() { | |
93 | // ret urn new Pr omise(func tion(resol ve, reject ) { | |
94 | // c lient.post (url, args , function (data, res ponse) { | |
95 | // resolve(d ata); | |
96 | // } ); | |
97 | // }); | |
98 | // }; | |
99 | ||
100 | // let p romise = m akeRestCal l(); | |
101 | ||
102 | // retur n promise; | |
103 | // } | |
104 | ||
105 | // functio n getResou rce(access _token, ur l, request Data) { | |
106 | // var a rgs = { | |
107 | // hea ders: { | |
108 | // A uthorizati on: access _token, | |
109 | // " Content-Ty pe": "appl ication/js on" | |
110 | // }, | |
111 | // dat a: request Data | |
112 | // }; | |
113 | ||
114 | // const makeRestC all = func tion() { | |
115 | // ret urn new Pr omise(func tion(resol ve, reject ) { | |
116 | // c lient.post (url, args , function (data, res ponse) { | |
117 | // resolve(d ata); | |
118 | // } ); | |
119 | // }); | |
120 | // }; | |
121 | ||
122 | // let p romise = m akeRestCal l(); | |
123 | // retur n promise; | |
124 | // } | |
125 | ||
126 | module.exp orts = rou ter; |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.