Skip to content

Commit 130e8d8

Browse files
committed
Fix solution code for exercise 20.3
1 parent 6a5b6a6 commit 130e8d8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
// This code won't work on its own, but is also included in the
22
// code/file_server.js file, which defines the whole system.
33

4-
methods.MKCOL = function(path, request, response) {
4+
methods.MKCOL = function(path, respond) {
55
fs.stat(path, function(error, stats) {
66
if (error && error.code == "ENOENT")
7-
fs.mkdir(path, respondErrorOrNothing(response));
7+
fs.mkdir(path, respondErrorOrNothing(respond));
88
else if (error)
9-
respond(500, error.toString(), response);
9+
respond(500, error.toString());
1010
else if (stats.isDirectory())
11-
respond(204, null, response);
11+
respond(204);
1212
else
13-
respond(400, "File exists", response);
13+
respond(400, "File exists");
1414
});
1515
};

0 commit comments

Comments
 (0)