bugfix
This commit is contained in:
parent
c4037684ba
commit
8f4650227f
@ -30,7 +30,7 @@ class DocumentRoute extends Route {
|
||||
|
||||
protected function readExtra() {
|
||||
parent::readExtra();
|
||||
$this->args = json_decode($this->extra) ?? [];
|
||||
$this->args = json_decode($this->extra, true) ?? [];
|
||||
}
|
||||
|
||||
public function preInsert(array &$row) {
|
||||
|
@ -82,7 +82,8 @@ export default function RouteEditView(props) {
|
||||
const onSave = useCallback(() => {
|
||||
if (!isSaving) {
|
||||
setSaving(true);
|
||||
let args = [route.pattern, route.type, route.target, route.extra, route.exact, route.active];
|
||||
let extra = ["dynamic", "static"].includes(route.type) ? route.extra : "";
|
||||
let args = [route.pattern, route.type, route.target, extra, route.exact, route.active];
|
||||
if (isNewRoute) {
|
||||
api.addRoute(...args).then(res => {
|
||||
setSaving(false);
|
||||
@ -123,7 +124,7 @@ export default function RouteEditView(props) {
|
||||
<RouteForm route={route} setRoute={setRoute} />
|
||||
<ButtonBar mt={2}>
|
||||
<Button startIcon={<KeyboardArrowLeft />}
|
||||
variant={"outlined"}
|
||||
variant={"outlined"} color={"error"}
|
||||
onClick={() => navigate("/admin/routes")}>
|
||||
{L("general.cancel")}
|
||||
</Button>
|
||||
|
Loading…
Reference in New Issue
Block a user