質問するログイン新規登録

質問編集履歴

2

短縮化

2017/11/16 17:14

投稿

Clover
Clover

スコア13

title CHANGED
File without changes
body CHANGED
@@ -22,11 +22,12 @@
22
22
  if (req.url.indexOf('home') !== -1) {
23
23
  var url_parts = url.parse(req.url, true);
24
24
  if (url_parts.query.id !== undefined) {
25
+
25
- if (auth(url_parts.query.id)) {
26
+ if (auth(url_parts.query.id)) {
26
- filePath = '/home.html';
27
+ filePath = '/home.html';
27
- } else {
28
+ } else {
28
- filePath = '/error.html';
29
+ filePath = '/error.html';
29
- }
30
+ }
30
31
  }
31
32
  } else {
32
33
  filePath = req.url;

1

短縮化

2017/11/16 17:14

投稿

Clover
Clover

スコア13

title CHANGED
File without changes
body CHANGED
@@ -28,10 +28,6 @@
28
28
  filePath = '/error.html';
29
29
  }
30
30
  }
31
- } else if (req.url == '/home') {
32
- filePath = '/home.html';
33
- } else if (req.url == '/error') {
34
- filePath = '/error.html';
35
31
  } else {
36
32
  filePath = req.url;
37
33
  }