We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a5b6a6 commit 130e8d8Copy full SHA for 130e8d8
code/solutions/20_3_creating_directories.js
@@ -1,15 +1,15 @@
1
// This code won't work on its own, but is also included in the
2
// code/file_server.js file, which defines the whole system.
3
4
-methods.MKCOL = function(path, request, response) {
+methods.MKCOL = function(path, respond) {
5
fs.stat(path, function(error, stats) {
6
if (error && error.code == "ENOENT")
7
- fs.mkdir(path, respondErrorOrNothing(response));
+ fs.mkdir(path, respondErrorOrNothing(respond));
8
else if (error)
9
- respond(500, error.toString(), response);
+ respond(500, error.toString());
10
else if (stats.isDirectory())
11
- respond(204, null, response);
+ respond(204);
12
else
13
- respond(400, "File exists", response);
+ respond(400, "File exists");
14
});
15
};
0 commit comments