mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
refactor(config) object properties shorthands
This commit is contained in:
parent
1887b0e13c
commit
44dc379053
1 changed files with 11 additions and 9 deletions
|
|
@ -152,27 +152,29 @@ function middle(req, res, next) {
|
|||
}
|
||||
}
|
||||
|
||||
function get(req, res) {
|
||||
function get(request, response) {
|
||||
const data = jonny.stringify(config);
|
||||
|
||||
ponse.send(data, {
|
||||
name : 'config.json',
|
||||
request : req,
|
||||
response: res,
|
||||
request,
|
||||
response,
|
||||
cache : false
|
||||
});
|
||||
}
|
||||
|
||||
function patch(req, res) {
|
||||
function patch(request, response) {
|
||||
const jsonStore = fullstore();
|
||||
const name = 'config.json';
|
||||
const cache = false;
|
||||
const options = {
|
||||
name : 'config.json',
|
||||
request : req,
|
||||
response: res,
|
||||
cache : false
|
||||
name,
|
||||
request,
|
||||
response,
|
||||
cache,
|
||||
};
|
||||
|
||||
pullout(req, 'string')
|
||||
pullout(request, 'string')
|
||||
.then(jonny.parse)
|
||||
.then(jsonStore)
|
||||
.then(manageConfig)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue