Skip to content

Commit 7b8f26f

Browse files
committed
fix: resolve issue with redirect handling after ID modification
1 parent fe93cc3 commit 7b8f26f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

adminforth/modules/restApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,6 +1131,7 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
11311131
return { error };
11321132
}
11331133
return {
1134+
recordId: record.id,
11341135
ok: true
11351136
}
11361137
}

adminforth/spa/src/views/EditView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ async function saveRecord() {
172172
});
173173
}
174174
saving.value = false;
175-
router.push({ name: 'resource-show', params: { resourceId: route.params.resourceId, primaryKey: coreStore.record[coreStore.primaryKey] } });
175+
router.push({ name: 'resource-show', params: { resourceId: route.params.resourceId, primaryKey: resp.recordId } });
176176
}
177177
178178
</script>

0 commit comments

Comments
 (0)