Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

categoriesToPost example is broken #255

Open
PedroBraude opened this issue May 14, 2024 · 0 comments
Open

categoriesToPost example is broken #255

PedroBraude opened this issue May 14, 2024 · 0 comments

Comments

@PedroBraude
Copy link

PedroBraude commented May 14, 2024

Hello guys! when i click on '''categories-to-posts" i got this:

TypeError: Cannot read properties of undefined (reading 'table')
    at dataRoute (file:///home/mape/Documents/uccaep/sonicjs/src/cms/admin/admin.ts:284:64)
    at null.<anonymous> (file:///home/mape/Documents/uccaep/sonicjs/src/cms/admin/admin.ts:338:35)
    at dispatch (file:///home/mape/Documents/uccaep/sonicjs/node_modules/hono/dist/compose.js:29:23)
    at null.<anonymous> (file:///home/mape/Documents/uccaep/sonicjs/node_modules/hono/dist/compose.js:30:20)
    at null.<anonymous> (file:///home/mape/Documents/uccaep/sonicjs/src/cms/admin/admin.ts:51:9)
    at async dispatch (file:///home/mape/Documents/uccaep/sonicjs/node_modules/hono/dist/compose.js:29:17)
    at null.<anonymous> (async file:///home/mape/Documents/uccaep/sonicjs/.wrangler/tmp/dev-aYv4bs/bundledWorker-0.32029522575725444.js:32796:3)
    at async dispatch (file:///home/mape/Documents/uccaep/sonicjs/node_modules/hono/dist/compose.js:29:17)
    at null.<anonymous> (async file:///home/mape/Documents/uccaep/sonicjs/.wrangler/tmp/dev-aYv4bs/bundledWorker-0.32029522575725444.js:32782:3)
    at async dispatch (file:///home/mape/Documents/uccaep/sonicjs/node_modules/hono/dist/compose.js:29:17)
[wrangler:inf] GET /admin/api/categoriesToPosts 500 Internal Server Error (11ms)

I think there is a problem with 'posts.ts'.

When I log from 'categoriesToPosts.ts' all post exports explicitly I get this.

console.log({
  posts,
  postsTable,
  postsTableName,
  postsRoute,
  postsDefinition,
  postsRelation,
  postsAccess,
  postsHooks,
  postsFields,
});

log results
{
  posts: {
    access: [Getter],
    definition: [Getter],
    fields: [Getter],
    hooks: [Getter],
    relation: [Getter],
    route: [Getter],
    table: [Getter],
    tableName: [Getter]
  },
  postsTable: undefined,
  postsTableName: undefined,
  postsRoute: undefined,
  postsDefinition: undefined,
  postsRelation: undefined,
  postsAccess: undefined,
  postsHooks: undefined,
  postsFields: undefined,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant