mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-20 15:15:37 +02:00
enhance(frontend): typed nirax (#16309)
* enhance(frontend): typed nirax * migrate router.replace * fix
This commit is contained in:
@@ -72,12 +72,20 @@ async function save() {
|
||||
roleId: role.value.id,
|
||||
...data.value,
|
||||
});
|
||||
router.push('/admin/roles/' + role.value.id);
|
||||
router.push('/admin/roles/:id', {
|
||||
params: {
|
||||
id: role.value.id,
|
||||
}
|
||||
});
|
||||
} else {
|
||||
const created = await os.apiWithDialog('admin/roles/create', {
|
||||
...data.value,
|
||||
});
|
||||
router.push('/admin/roles/' + created.id);
|
||||
router.push('/admin/roles/:id', {
|
||||
params: {
|
||||
id: created.id,
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,11 @@ const role = reactive(await misskeyApi('admin/roles/show', {
|
||||
}));
|
||||
|
||||
function edit() {
|
||||
router.push('/admin/roles/' + role.id + '/edit');
|
||||
router.push('/admin/roles/:id/edit', {
|
||||
params: {
|
||||
id: role.id,
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async function del() {
|
||||
|
||||
Reference in New Issue
Block a user