|
@@ -12,10 +12,6 @@ class API {
|
|
this.logger = new Logger(path.join(__dirname, '../logs/API.log'), 'INFO');
|
|
this.logger = new Logger(path.join(__dirname, '../logs/API.log'), 'INFO');
|
|
}
|
|
}
|
|
|
|
|
|
- setNamespace(namespace, filename) {
|
|
|
|
- this.namespace = namespace;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
setPath(path) {
|
|
setPath(path) {
|
|
this.path = path;
|
|
this.path = path;
|
|
}
|
|
}
|
|
@@ -37,12 +33,6 @@ class API {
|
|
await this.onRequest(req, res);
|
|
await this.onRequest(req, res);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
-
|
|
|
|
- setAllowCORS(res) {
|
|
|
|
- res.setHeader('Access-Control-Allow-Origin', '*');
|
|
|
|
- res.setHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE');
|
|
|
|
- res.setHeader('Access-Control-Allow-Headers', 'Content-Type');
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
|
|
|
|
module.exports = API;
|
|
module.exports = API;
|