Now follows our airbnb linting schema.
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
const configuration = require('src/config/configuration').getInstance();
|
||||
const GitRepository = require('src/git/gitRepository');
|
||||
|
||||
const gitRepository = new GitRepository();
|
||||
|
||||
function dumpHookController(req, res) {
|
||||
gitRepository.dumpHook(req.body)
|
||||
.then(() => {
|
||||
res.status(200);
|
||||
})
|
||||
.catch((error) => {
|
||||
res.status(500);
|
||||
})
|
||||
gitRepository.dumpHook(req.body)
|
||||
.then(() => {
|
||||
res.status(200);
|
||||
})
|
||||
.catch((error) => {
|
||||
res.status(500);
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = dumpHookController;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
const RequestRepository = require('src/plex/requestRepository.js');
|
||||
|
||||
const requestRepository = new RequestRepository();
|
||||
|
||||
/**
|
||||
@@ -11,12 +12,12 @@ function historyController(req, res) {
|
||||
const user = req.loggedInUser;
|
||||
|
||||
requestRepository.fetchRequested()
|
||||
.then((requestedItems) => {
|
||||
res.send({ success: true, requestedItems });
|
||||
})
|
||||
.catch((error) => {
|
||||
res.status(401).send({ success: false, error: error.message });
|
||||
});
|
||||
.then((requestedItems) => {
|
||||
res.send({ success: true, requestedItems });
|
||||
})
|
||||
.catch((error) => {
|
||||
res.status(401).send({ success: false, error: error.message });
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = historyController;
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
const StrayRepository = require('src/seasoned/strayRepository');
|
||||
|
||||
const strayRepository = new StrayRepository();
|
||||
|
||||
function verifyStrayController(req, res) {
|
||||
const id = req.params.strayId;
|
||||
const id = req.params.strayId;
|
||||
|
||||
strayRepository.verifyStray(id)
|
||||
.then(() => {
|
||||
res.send({ success: true, message: 'Episode verified' });
|
||||
})
|
||||
.catch((error) => {
|
||||
res.status(500).send({ success: false, error: error.message });
|
||||
});
|
||||
strayRepository.verifyStray(id)
|
||||
.then(() => {
|
||||
res.send({ success: true, message: 'Episode verified' });
|
||||
})
|
||||
.catch((error) => {
|
||||
res.status(500).send({ success: false, error: error.message });
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = verifyStrayController;
|
||||
|
||||
Reference in New Issue
Block a user