Skip to content

Error creating link #750

@jacob-h97

Description

@jacob-h97

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions