Adding a less complex router

This commit is contained in:
Matthew Aaron Raymer
2023-01-09 15:10:05 +08:00
parent ba85663048
commit 487997b87c
3 changed files with 28 additions and 35 deletions

View File

@@ -10,7 +10,6 @@
class="text-lg text-center px-2 py-1 absolute -left-2 -top-1"
><fa icon="chevron-left" class="fa-fw"></fa
></router-link>
[New/Edit] Project
</h1>
</div>
@@ -39,7 +38,7 @@
type="text"
placeholder="Project Name"
class="block w-full rounded border border-slate-400 mb-4 px-3 py-2"
v-modal="projectName"
v-model="projectName"
/>
<textarea
@@ -134,6 +133,12 @@ export default class NewEditProjectView extends Vue {
try {
const resp = await this.axios.post(url, payload, { headers });
console.log(resp.status, resp.data);
const route = {
name: "project",
params: { projectId: resp.data },
};
console.log(route);
this.$router.push(route);
} catch (error) {
console.log(error);
}