add testing example in frontend for assigning a helper
This commit is contained in:
parent
8e44a5ea51
commit
993e3d69b6
|
@ -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
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue