feat: do nothing if user and password are empty in osTicketConfig

This commit is contained in:
Vicent Llopis 2022-09-16 10:31:02 +02:00
parent cfe5c66fe4
commit 7480bf8a69
1 changed files with 4 additions and 1 deletions

View File

@ -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({