fix json validation
This commit is contained in:
parent
de449c6d56
commit
5830d7fb43
|
@ -5,10 +5,10 @@ const config = require('../config');
|
|||
const runtime = require('../runtime');
|
||||
const { Job } = require('../job');
|
||||
const package = require('../package')
|
||||
const logger = require('logplease').create('api/v1');
|
||||
const logger = require('logplease').create('api/v2');
|
||||
|
||||
router.use((req, res, next) => {
|
||||
if (!req.body) {
|
||||
if (!req.body || req.body === '') {
|
||||
return next();
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,10 @@ const axios = require('axios').default;
|
|||
|
||||
const axios_instance = argv => {
|
||||
argv.axios = axios.create({
|
||||
baseURL: argv['piston-url']
|
||||
baseURL: argv['piston-url'],
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
|
||||
return argv;
|
||||
|
|
Loading…
Reference in New Issue