refs #5863 Fixes: Mailer, logout & run db
gitea/hedera-web/pipeline/head This commit looks good Details

This commit is contained in:
Juan Ferrer 2023-08-21 11:41:51 +02:00
parent a59c44fb3a
commit 8f98597ea2
4 changed files with 13 additions and 11 deletions

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
hedera-web (23.30.3) stable; urgency=low hedera-web (23.30.4) stable; urgency=low
* Initial Release. * Initial Release.

View File

@ -85,7 +85,7 @@ module.exports = new Class({
const config = { const config = {
headers: {'Authorization': token} headers: {'Authorization': token}
}; };
await this.send('user/logout'); await this.send('user/logout', null, config);
await this.post('Accounts/logout', null, config); await this.post('Accounts/logout', null, config);
} }
}, },
@ -140,15 +140,16 @@ module.exports = new Class({
/* /*
* Called when REST response is received. * Called when REST response is received.
*/ */
async sendWithUrl(method, url, params) { async sendWithUrl(method, url, params, config) {
return this.request({ config = Object.assign({}, config, {
method, method,
url, url,
data: Vn.Url.makeUri(params), data: Vn.Url.makeUri(params)
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}); });
config.headers = Object.assign({}, config.headers, {
'Content-Type': 'application/x-www-form-urlencoded'
});
return this.request(config);
}, },
async get(url, config) { async get(url, config) {

View File

@ -1,6 +1,6 @@
{ {
"name": "hedera-web", "name": "hedera-web",
"version": "23.30.3", "version": "23.30.4",
"description": "Verdnatura web page", "description": "Verdnatura web page",
"license": "GPL-3.0", "license": "GPL-3.0",
"repository": { "repository": {
@ -42,7 +42,7 @@
"scripts": { "scripts": {
"front": "webpack serve --open", "front": "webpack serve --open",
"back": "cd ../salix && gulp backOnly", "back": "cd ../salix && gulp backOnly",
"db": "cd ../vn-database && myvc run", "db": "cd ../vn-database && myt run",
"build": "rm -rf build/ ; webpack", "build": "rm -rf build/ ; webpack",
"clean": "rm -rf build/" "clean": "rm -rf build/"
} }

View File

@ -5,6 +5,7 @@ namespace Vn\Web;
require_once 'libphp-phpmailer/autoload.php'; require_once 'libphp-phpmailer/autoload.php';
use Vn\Lib\UserException; use Vn\Lib\UserException;
use PHPMailer\PHPMailer\PHPMailer;
class Mailer { class Mailer {
private $conf; private $conf;
@ -19,7 +20,7 @@ class Mailer {
function createObject($mailTo, $body, $subject) { function createObject($mailTo, $body, $subject) {
$conf = $this->conf; $conf = $this->conf;
$mail = new \PHPMailer(); $mail = new PHPMailer();
$mail->isSMTP(); $mail->isSMTP();
$mail->Host = $conf->host; $mail->Host = $conf->host;