Extend from WebHandlerModule
This commit is contained in:
parent
0e32e3856e
commit
a00a93859e
|
@ -58,7 +58,10 @@ exports.getModule = class ProfileServerModule extends ServerModule {
|
|||
this._getUser(resource, resp, (err, user, accountName) => {
|
||||
if (err) {
|
||||
// |resp| already written to
|
||||
return Log.warn({ error: err.message }, `Profile request failed: ${req.url}`);
|
||||
return Log.warn(
|
||||
{ error: err.message },
|
||||
`Profile request failed: ${req.url}`
|
||||
);
|
||||
}
|
||||
|
||||
// TODO: More user information here
|
||||
|
@ -77,7 +80,6 @@ exports.getModule = class ProfileServerModule extends ServerModule {
|
|||
}
|
||||
|
||||
_getUser(resource, resp, cb) {
|
||||
|
||||
const notFound = () => {
|
||||
this.webServer.instance.respondWithError(
|
||||
resp,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const { ServerModule } = require('../../../server_module');
|
||||
const WebHandlerModule = require('../../../web_handler_module');
|
||||
const Config = require('../../../config').get;
|
||||
const { Errors } = require('../../../enig_error');
|
||||
|
||||
|
@ -16,7 +16,7 @@ exports.moduleInfo = {
|
|||
packageName: 'codes.l33t.enigma.web.handler.finger',
|
||||
};
|
||||
|
||||
exports.getModule = class WebFingerServerModule extends ServerModule {
|
||||
exports.getModule = class WebFingerServerModule extends WebHandlerModule {
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
const { PluginModule } = require('./plugin_module');
|
||||
|
||||
module.exports = class WebHandlerModule extends PluginModule {
|
||||
constructor(options) {
|
||||
super(options);
|
||||
}
|
||||
|
||||
init(cb) {
|
||||
// to be implemented!
|
||||
return cb(null);
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue