You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For testing purposes I created a json-file db.json with no data like this: { "tasks": [ { } ] }
I also created a file routes.json { "/api/demo/tasks": "/tasks" }
I than started a json api server with json-server db.json on default port 3000
I changed 'url:' in api.js to url: 'http://127.0.0.1:3000' and ran vue-crud (simple-crud) by npn run serve
The vue-crud page displays with no errors. I add a record with the + symbol, the json-server accepts it with 201 and POST /api/demo/tasks 201 27.237 ms - 92. The db.json file got the record as expected: { "tasks": [ { "name": "test", "description": "this is a test record", "apiId": "demo", "id": 1 } ] }
The problem is, that vue-crud does not show this (or any) record. Refreshing does not help, the list stays beeing empty.
The text was updated successfully, but these errors were encountered:
Hi, I ran into the same problem like yours. It turns out to be the problem of my model definition. The task should have one important attribute: active, which should be int type and has default value 1. Otherwise no record will be shown.
Hi, I encountered the same problem and now I got the 'active' attribute should be 1.
However, It's still unclear where I should fix to make active field 1 by default.
For testing purposes I created a json-file db.json with no data like this:
{ "tasks": [ { } ] }
I also created a file routes.json
{ "/api/demo/tasks": "/tasks" }
I than started a json api server with
json-server db.json
on default port 3000I changed 'url:' in api.js to
url: 'http://127.0.0.1:3000'
and ran vue-crud (simple-crud) bynpn run serve
The vue-crud page displays with no errors. I add a record with the + symbol, the json-server accepts it with 201 and
POST /api/demo/tasks 201 27.237 ms - 92
. The db.json file got the record as expected:{ "tasks": [ { "name": "test", "description": "this is a test record", "apiId": "demo", "id": 1 } ] }
The problem is, that vue-crud does not show this (or any) record. Refreshing does not help, the list stays beeing empty.
The text was updated successfully, but these errors were encountered: