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

Error creating link #750

Open
daniel-sockness opened this issue Jun 17, 2024 · 0 comments
Open

Error creating link #750

daniel-sockness opened this issue Jun 17, 2024 · 0 comments

Comments

@daniel-sockness
Copy link

daniel-sockness commented Jun 17, 2024

When using the api from xyz.com/api/v2/links

With the following request

curl --location 'https://xyz.com/api/v2/links' \ --header 'X-API-KEY: apikey' \ --header 'Content-Type: application/json' \ --data '{ "target": "test.com", "customurl": "123", "reuse": true, "domain": "xyz.com" }'

I get the following error it also occurs if I create it from the web page

fatal Error: Undefined binding(s) detected when compiling FIRST. Undefined column(s): [domain_id] query: select "links"."id", "links"."address", "links"."banned", "links"."created_at", "links"."domain_id", "links"."updated_at", "links"."password", "links"."description", "links"."expire_in", "links"."target", "links"."visit_count", "links"."user_id", "links"."uuid", "domains"."address" as "domain" from "links" left join "domains" on "links"."domain_id" = "domains"."id" where "target" = ? and "domain_id" = ? and "links"."user_id" = ? limit ? at QueryCompiler_PG.toSQL (/home/kutt/node_modules/knex/lib/query/querycompiler.js:112:13) at QueryBuilder_PostgreSQL.toSQL (/home/kutt/node_modules/knex/lib/query/querybuilder.js:84:44) at ensureConnectionCallback (/home/kutt/node_modules/knex/lib/execution/internal/ensure-connection-callback.js:4:30) at Runner.ensureConnection (/home/kutt/node_modules/knex/lib/execution/runner.js:318:20) at runMicrotasks (<anonymous>) at processTicksAndRejections (internal/process/task_queues.js:97:5) at async Runner.run (/home/kutt/node_modules/knex/lib/execution/runner.js:30:19) at async Object.find (/home/kutt/production-server/queries/link.js:100:18) at async Promise.all (index 3) at async create (/home/kutt/production-server/handlers/links.js:67:21)

I have also tried using both the postgres id for the domain as well as the uuid in the domain table.

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