This commit is contained in:
parent
246bc04ea8
commit
5db53cf8ef
|
@ -51,7 +51,10 @@ func HandleTesting(c echo.Context) error {
|
||||||
content := []map[string]interface{}{}
|
content := []map[string]interface{}{}
|
||||||
err := json.Unmarshal(buf.Bytes(), &content)
|
err := json.Unmarshal(buf.Bytes(), &content)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return c.JSON(http.StatusInternalServerError, err)
|
return c.JSON(http.StatusInternalServerError, map[string]interface{}{
|
||||||
|
"error": true,
|
||||||
|
"message": err.Error(),
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
err = db.RestoreAndTruncate(table, content)
|
err = db.RestoreAndTruncate(table, content)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user