Fetch tickets after creating example content
This commit is contained in:
parent
8ab2ccadbe
commit
5a8c3920e1
|
@ -46,13 +46,14 @@ export default {
|
||||||
$route: 'fetchTickets',
|
$route: 'fetchTickets',
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.createExampleContent()
|
this.createExampleContent().finally(() => {
|
||||||
this.fetchTickets()
|
this.fetchTickets()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
createExampleContent() {
|
async createExampleContent() {
|
||||||
// this obviously shouldn't survive version 1.0
|
// this obviously shouldn't survive version 1.0
|
||||||
axios.post(
|
await axios.post(
|
||||||
'api/v1/tickets',
|
'api/v1/tickets',
|
||||||
{ title: 'Ein Ticket', content: 'Ein Beispiel' },
|
{ title: 'Ein Ticket', content: 'Ein Beispiel' },
|
||||||
{ headers: { 'Content-Type': 'application/json', Accept: 'application/json' } },
|
{ headers: { 'Content-Type': 'application/json', Accept: 'application/json' } },
|
||||||
|
|
Loading…
Reference in a new issue