Skip to content

Commit 7b6cc79

Browse files
committedSep 28, 2022
Simplify imports
1 parent b415e1a commit 7b6cc79

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed
 

‎lib/Server.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ const PatchHandler = require('./handlers/PatchHandler');
1616
const PostHandler = require('./handlers/PostHandler');
1717
const DeleteHandler = require('./handlers/DeleteHandler');
1818
const RequestValidator = require('./validators/RequestValidator');
19-
const ERRORS = require('./constants').ERRORS;
20-
const EXPOSED_HEADERS = require('./constants').EXPOSED_HEADERS;
21-
const REQUEST_METHODS = require('./constants').REQUEST_METHODS;
22-
const TUS_RESUMABLE = require('./constants').TUS_RESUMABLE;
19+
const { ERRORS, EXPOSED_HEADERS, REQUEST_METHODS, TUS_RESUMABLE } = require('./constants');
2320
const debug = require('debug');
2421
const log = debug('tus-node-server');
2522
class TusServer extends EventEmitter {

‎lib/handlers/OptionsHandler.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
'use strict';
22

33
const BaseHandler = require('./BaseHandler');
4-
const ALLOWED_METHODS = require('../constants').ALLOWED_METHODS;
5-
const ALLOWED_HEADERS = require('../constants').ALLOWED_HEADERS;
6-
const MAX_AGE = require('../constants').MAX_AGE;
4+
const { ALLOWED_METHODS, ALLOWED_HEADERS, MAX_AGE } = require('../constants');
75

86
// A successful response indicated by the 204 No Content status MUST contain
97
// the Tus-Version header. It MAY include the Tus-Extension and Tus-Max-Size headers.

0 commit comments

Comments
 (0)
Please sign in to comment.