Fetch tickets after creating example content

This commit is contained in:
Ben 2022-02-26 17:09:56 +01:00
parent 8ab2ccadbe
commit 5a8c3920e1
Signed by: ben
GPG Key ID: 0F54A7ED232D3319
1 changed files with 5 additions and 4 deletions

View File

@ -46,13 +46,14 @@ export default {
$route: 'fetchTickets',
},
created() {
this.createExampleContent()
this.fetchTickets()
this.createExampleContent().finally(() => {
this.fetchTickets()
})
},
methods: {
createExampleContent() {
async createExampleContent() {
// this obviously shouldn't survive version 1.0
axios.post(
await axios.post(
'api/v1/tickets',
{ title: 'Ein Ticket', content: 'Ein Beispiel' },
{ headers: { 'Content-Type': 'application/json', Accept: 'application/json' } },