diff --git a/lib/Controller/TicketApiController.php b/lib/Controller/TicketApiController.php index bdaefb3..cd175d5 100644 --- a/lib/Controller/TicketApiController.php +++ b/lib/Controller/TicketApiController.php @@ -51,14 +51,14 @@ class TicketApiController extends ApiController return new DataResponse($this->service->create($title, $content, $this->userId)); } + + /** * @NoAdminRequired */ - public function update(int $id, string $title, string $content): DataResponse + public function update(): DataResponse { - return $this->handleNotFound(function () use ($id, $title, $content) { - return $this->service->update($id, $title, $content, $this->userId); - }); + return new DataResponse($this->service->assign(44,$this->userId)); } public function destroy(int $id): DataResponse diff --git a/src/App.vue b/src/App.vue index 8d83029..d93efd1 100644 --- a/src/App.vue +++ b/src/App.vue @@ -65,6 +65,13 @@ export default { 'api/v1/tickets/1', { headers: { 'Content-Type': 'application/json', Accept: 'application/json' } }, ).catch(console.error) + axios.put( + 'api/v1/tickets/1', + {}, + { headers: { 'Content-Type': 'application/json', Accept: 'application/json' } } + ).then((response) => { + console.error('added a helper to ticket 2') + }).catch(console.error) }, fetchTickets() { axios.get(