feat: do nothing if user and password are empty in osTicketConfig
This commit is contained in:
parent
cfe5c66fe4
commit
7480bf8a69
|
@ -11,7 +11,7 @@ module.exports = Self => {
|
|||
},
|
||||
http: {
|
||||
path: `/closeTicket`,
|
||||
verb: 'GET'
|
||||
verb: 'POST'
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -19,6 +19,9 @@ module.exports = Self => {
|
|||
const models = Self.app.models;
|
||||
const config = await models.OsTicketConfig.findOne();
|
||||
|
||||
if (!config.user || !config.password)
|
||||
return false;
|
||||
|
||||
const ostUri = `${config.host}/login.php`;
|
||||
|
||||
const con = mysql.createConnection({
|
||||
|
|
Loading…
Reference in New Issue