Closed tony-kerz closed 7 years ago
doh! after some shut-eye noticed this on the server side:
app:index "SequelizeBaseError: Unknown column 'Alert._id' in 'order clause'\n at Query.formatError (/Users/tony/git/udx-api/node_modules/sequelize/lib/dialects/mysql/query.js:222:16)\n at Query.connection.query [as onResult] (/Users/tony/git/udx-api/node_modules/sequelize/lib/dialects/mysql/query.js:55:23)\n at Query.Command.execute (/Users/tony/git/udx-api/node_modules/mysql2/lib/commands/command.js:31:12)\n at Connection.handlePacket (/Users/tony/git/udx-api/node_modules/mysql2/lib/connection.js:417:28)\n at PacketParser.onPacket (/Users/tony/git/udx-api/node_modules/mysql2/lib/connection.js:93:16)\n at PacketParser.executeStart (/Users/tony/git/udx-api/node_modules/mysql2/lib/packet_parser.js:73:14)\n at Socket.<anonymous> (/Users/tony/git/udx-api/node_modules/mysql2/lib/connection.js:101:29)\n at emitOne (events.js:115:13)\n at Socket.emit (events.js:210:7)\n at addChunk (_stream_readable.js:252:12)\n at readableAddChunk (_stream_readable.js:239:11)\n at Socket.Readable.push (_stream_readable.js:197:10)\n at TCP.onread (net.js:589:20)" +1ms
used this for app.js
:
import React from 'react'
import ErrorIcon from 'material-ui/svg-icons/alert/error'
import {Admin, Resource} from 'admin-on-rest'
import {restClient} from 'aor-feathers-client'
import feathersClient from './feathers-client'
import {AlertList} from './alerts'
import Dashboard from './dashboard'
// const options = {id: '_id'}
const App = () =>
<Admin dashboard={Dashboard} restClient={restClient(feathersClient)}>
<Resource name="alerts" list={AlertList} icon={ErrorIcon} />
</Admin>
export default App
and voila:
so all good š thanks again for the adapter š
hey man, thanks for writing this adapter!
i'm kind of new to aor and feathers, so it's entirely possible i'm just being a dunce, but i have this setup and i'm getting the above error in the browser when trying to do a simple list.
here are some relevant snippets:
feathers-client.js
const host = 'http://localhost:3000'
export default feathers() .configure(feathers.hooks()) .configure(feathers.rest(host).fetch(window.fetch.bind(window)))
import React from 'react' import ErrorIcon from 'material-ui/svg-icons/alert/error' import {Admin, Resource} from 'admin-on-rest' import {restClient} from 'aor-feathers-client' import feathersClient from './feathers-client' import {AlertList} from './alerts' import Dashboard from './dashboard'
const options = {id: '_id'}
const App = () => <Admin dashboard={Dashboard} restClient={restClient(feathersClient, options)}>
export default App
import React from 'react' import {List, Datagrid, TextField} from 'admin-on-rest'
// eslint-disable-next-line import/prefer-default-export export const AlertList = props => <List title="All alerts" {...props}>