pull/25/head
Alex Puiu 2022-05-19 11:47:30 +03:00
rodzic 2ed824c91e
commit 99ee5403e0
2 zmienionych plików z 4 dodań i 7 usunięć

Wyświetl plik

@ -1,7 +1,7 @@
<?php
error_reporting(E_ERROR | E_PARSE);
require __DIR__ . '/vendor/autoload.php';
require_once("config.php");
require_once(__DIR__ . '/vendor/autoload.php');
require_once(__DIR__ . '/config.php');
use Mail2Deck\MailClass;
use Mail2Deck\DeckClass;

Wyświetl plik

@ -2,9 +2,6 @@
namespace Mail2Deck;
use stdClass;
use CURLFile;
class DeckClass {
private $responseCode;
@ -80,7 +77,7 @@ class DeckClass {
return false;
}
$boardStack = new stdClass();
$boardStack = new \stdClass();
$boardStack->board = $boardId;
$boardStack->stack = $stackId;
$boardStack->newTitle = $params;
@ -118,7 +115,7 @@ class DeckClass {
for ($i = 0; $i < count($attachments); $i++) {
$file = $fullPath . $attachments[$i];
$data = array(
'file' => new CURLFile($file)
'file' => new \CURLFile($file)
);
$this->apiCall("POST", NC_SERVER . "/index.php/apps/deck/api/v1.0/boards/{$card->board}/stacks/{$card->stack}/cards/{$card->id}/attachments?type=file", $data, true);
unlink($file);