Download invoice fixes
gitea/hedera-web/pipeline/head This commit looks good Details

This commit is contained in:
Juan Ferrer 2022-05-20 14:20:34 +02:00
parent 1d782a28ed
commit 2aff47ef2e
6 changed files with 7985 additions and 31 deletions

2
debian/changelog vendored
View File

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

View File

@ -9,7 +9,7 @@ Hedera.Invoices = new Class({
var params = {
srv: 'rest:dms/invoice',
invoice: invoiceId,
token: this.conn.token
access_token: this.conn.token
};
Object.assign(column, {

7998
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "hedera-web",
"version": "1.407.68",
"version": "1.407.69",
"description": "Verdnatura web page",
"license": "GPL-3.0",
"repository": {

View File

@ -81,7 +81,7 @@ class RestService extends Service {
http_response_code($status);
}
function errorHandler($errno, $message, $file, $line, $context) {
function errorHandler($errno, $message, $file, $line, $context = NULL) {
$eFlag =
E_USER_NOTICE
| E_USER_WARNING

View File

@ -138,13 +138,19 @@ abstract class Service {
function login() {
$db = $this->db;
$anonymousUser = TRUE;
$token = NULL;
if (!empty($_SERVER['HTTP_AUTHORIZATION'])) {
if (!empty($_SERVER['HTTP_AUTHORIZATION']))
$token = $_SERVER['HTTP_AUTHORIZATION'];
if (!empty($_GET['access_token']))
$token = $_GET['access_token'];
if (isset($token)) {
$userId = $db->getValue(
'SELECT userId FROM salix.AccessToken
WHERE id = #
AND NOW() <= TIMESTAMPADD(SECOND, ttl, created)',
[$_SERVER['HTTP_AUTHORIZATION']]
[$token]
);
if (!$userId)