File tree 4 files changed +6
-13
lines changed
controller-proxy/proxy-user/controllers
4 files changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -2,11 +2,4 @@ var framework = require('total.js');
2
2
var http = require ( 'http' ) ;
3
3
4
4
framework . run ( http , true , parseInt ( process . argv [ 2 ] ) ) ;
5
-
6
- framework . test ( true , function ( ) {
7
- console . log ( '' ) ;
8
- console . log ( '====================================================' ) ;
9
- console . log ( 'Congratulations, the test was successful!' ) ;
10
- console . log ( '====================================================' ) ;
11
- console . log ( '' ) ;
12
- } ) ;
5
+ framework . test ( ) ;
Original file line number Diff line number Diff line change 1
1
exports . install = function ( framework ) {
2
+ framework . route ( '/users/' , json_users ) ;
2
3
framework . route ( '/' , json_users , [ 'proxy' ] ) ;
3
4
} ;
4
5
5
6
function json_users ( ) {
6
-
7
+
7
8
var self = this ;
8
-
9
+
9
10
var users = [
10
11
{ name : 'Peter' , age : 30 } ,
11
12
{ name : 'Jano' , age : 23 } ,
@@ -22,5 +23,5 @@ function json_users() {
22
23
} ) ;
23
24
24
25
self . json ( output ) ;
25
-
26
+
26
27
} ;
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ function cors_time_preflight() {
8
8
var self = this ;
9
9
10
10
if ( ! self . cors ( '*' , [ 'GET' ] ) ) {
11
- self . plain ( 'Not allowed ' ) ;
11
+ self . plain ( 'NOT ALLOWED - OPTIONS - PREFLIGHT ' ) ;
12
12
return ;
13
13
}
14
14
Original file line number Diff line number Diff line change 4
4
@{meta}
5
5
< meta charset ="utf-8 " />
6
6
< meta http-equiv ="content-language " content ="sk " />
7
- < meta http-equiv ="X-UA-Compatible " content ="IE=10 " />
8
7
< meta name ="format-detection " content ="telephone=no "/>
9
8
< meta name ="viewport " content ="width=1024, user-scalable=yes " />
10
9
< meta name ="robots " content ="all,follow " />
You can’t perform that action at this time.
0 commit comments