Fix code style and PHP5.6 errors

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2018-06-12 17:40:52 +02:00
parent 94397dedb1
commit 344ed6d928
3 changed files with 5 additions and 4 deletions

View File

@@ -59,7 +59,7 @@ return [
['name' => 'card#assignUser', 'url' => '/cards/{cardId}/assign', 'verb' => 'POST'],
['name' => 'card#unassignUser', 'url' => '/cards/{cardId}/assign/{userId}', 'verb' => 'DELETE'],
['name' => 'attachment#list', 'url' => '/cards/{cardId}/attachments', 'verb' => 'GET'],
['name' => 'attachment#getAll', 'url' => '/cards/{cardId}/attachments', 'verb' => 'GET'],
['name' => 'attachment#display', 'url' => '/cards/{cardId}/attachment/{attachmentId}', 'verb' => 'GET'],
['name' => 'attachment#create', 'url' => '/cards/{cardId}/attachment', 'verb' => 'POST'],
['name' => 'attachment#update', 'url' => '/cards/{cardId}/attachment/{attachmentId}', 'verb' => 'UPDATE'],

View File

@@ -59,15 +59,16 @@ app.controller('CardController', function ($scope, $rootScope, $sce, $location,
'File already exists',
function(result) {
if (result) {
$scope.runUpload(fileItem)
$scope.runUpload(fileItem);
} else {
// TODO: check for proper number and append it before the file extension
// TODO: iterate over attachments (check if matches "file.name (n)") increase n
fileItem.file.name = fileItem.file.name + '.1';
}
}
);
} else {
$scope.runUpload(fileItem)
$scope.runUpload(fileItem);
}
};
$scope.uploader.onSuccessItem = function(item, response) {

View File

@@ -38,7 +38,7 @@ class AttachmentController extends Controller {
$this->attachmentService = $attachmentService;
}
public function list($cardId) {
public function getAll($cardId) {
return $this->attachmentService->getAll($cardId);
}