Closed hadogenes closed 4 years ago
Hi,
Unfortunately I've never used postgresql in the past and can't really help you with this issue.
As screeenly uses Laravel under the hood I can only point you to the database docs.
I can also point you to the code which executes above query: https://github.com/stefanzweifel/screeenly/blob/2187309ecf80e358de3043875c642e10e5d4c94f/modules/Screeenly/Models/ApiKey.php#L36-L45
And this is the database migration which creates the database table: https://github.com/stefanzweifel/screeenly/blob/2187309ecf80e358de3043875c642e10e5d4c94f/database/migrations/2015_07_08_211146_create_api_keys_table.php#L15-L23
What is really weird is the WHERE clause. That should be api_keys.key
and not api_keys.id
.
select *
from "api_keys"
where "api_keys"."id" = 8MARLdT6gVayOaSQ8YI9Bn5nRdSfqljbnD4iVBTUFPjWXDXvGj
limit 1
This should be the query
select *
from "api_keys"
where "api_keys"."key" = 8MARLdT6gVayOaSQ8YI9Bn5nRdSfqljbnD4iVBTUFPjWXDXvGj
limit 1
I've updated the code a bit in https://github.com/stefanzweifel/screeenly/commit/2187309ecf80e358de3043875c642e10e5d4c94f. Maybe you can update your copy and try it again?
Thanks it works now
When I try to add new api_key i get error:
I'm using postgresql