diff --git a/admin/table/api.go b/admin/table/api.go index 6041ff2..331fcc3 100644 --- a/admin/table/api.go +++ b/admin/table/api.go @@ -76,7 +76,6 @@ func PostApiUpdate(c *fiber.Ctx) error { return c.RedirectBack("/admin/table/", 303) } - func GetApiInsert(c *fiber.Ctx) error { _, err := AuthCheck(c, true) if err != nil { return c.Redirect("/") } @@ -84,6 +83,7 @@ func GetApiInsert(c *fiber.Ctx) error { table := c.Params("table") typeOf := data.Models()[table] result := reflect.New(typeOf) + return c.JSON(result.Interface()) } diff --git a/views/admin/table/index.html b/views/admin/table/index.html index 0183220..02f04a2 100644 --- a/views/admin/table/index.html +++ b/views/admin/table/index.html @@ -1,4 +1,3 @@ - + +