upload files into repos
This commit is contained in:
parent
26f3a75b2d
commit
3516e3554f
@ -11,8 +11,29 @@ class Method {
|
|||||||
query,
|
query,
|
||||||
body,
|
body,
|
||||||
files,
|
files,
|
||||||
|
cookies
|
||||||
) {
|
) {
|
||||||
|
let paramScheme;
|
||||||
|
let required = { missed : [], unsyntax : [] };
|
||||||
|
let additional = { missed : [], unsyntax : [] };
|
||||||
|
let checkKeys = new Array();
|
||||||
|
for (let param in this.paramsCompiles) {
|
||||||
|
paramScheme = {
|
||||||
|
required : false,
|
||||||
|
allow_methods : ['get', 'post', 'put', 'delete'],
|
||||||
|
allow_params : ['headers', 'json', 'params', 'query', 'body', 'files', 'cookies']
|
||||||
|
};
|
||||||
|
// Configure paramScheme
|
||||||
|
for (let key in this.paramsCompiles[param]) { paramScheme[key] = this.paramsCompiles[param][key]; }
|
||||||
|
// check missible
|
||||||
|
if (headers[param] !== undefined & paramScheme.allow_params.indexOf('headers') != -1) { checkKeys.push('headers'); }
|
||||||
|
if (json[param] !== undefined) { checkKeys.push('json'); }
|
||||||
|
if (query[param] !== undefined) { checkKeys.push('query'); }
|
||||||
|
if (body[param] !== undefined) { checkKeys.push('body'); }
|
||||||
|
if (files[param] !== undefined) { checkKeys.push('files'); }
|
||||||
|
if (cookies[param] !== undefined) { checkKeys.push('cookies'); }
|
||||||
|
if (params[param] !== undefined) { checkKeys.push('params'); }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
execute () {}
|
execute () {}
|
||||||
|
Loading…
Reference in New Issue
Block a user