user: load run on component creation

This commit is contained in:
Simone Gotti 2019-07-09 11:21:37 +02:00
parent c3950fbdd6
commit aad3358498
1 changed files with 19 additions and 9 deletions

View File

@ -199,6 +199,16 @@ export default {
projectGroupCreateProjectGroupLink("user", this.username, [])
);
}
},
created: async function() {
if (this.$route.params.runid) {
let { data, error } = await fetchRun(this.$route.params.runid);
if (error) {
this.$store.dispatch("setError", error);
return;
}
this.run = data;
}
}
};
</script>