keep-starknet-strange / art-peace

Competitive art canvas on Starknet
https://art-peace.net
MIT License
29 stars 51 forks source link

Update factions.go #220

Closed adrianvrj closed 5 months ago

adrianvrj commented 5 months ago
vercel[bot] commented 5 months ago

@adrianvrj is attempting to deploy a commit to the keep-starknet-strange Team on Vercel.

A member of the Team first needs to authorize it.

adrianvrj commented 5 months ago

Nice work so far!

will solve your requests asap!

b-j-roberts commented 5 months ago

When using the route, I am getting {"data": null}. So I think there may be something wrong with the query.

You can test the route by starting the app with docker compose. There are details in the readme for that, then doing curl http://localhost:8080/get-faction-members\?factionID\=0

I'd also recommend testing the query with psql so you don't need to restart each time you change the query.

adrianvrj commented 5 months ago

When using the route, I am getting {"data": null}. So I think there may be something wrong with the query.

You can test the route by starting the app with docker compose. There are details in the readme for that, then doing curl http://localhost:8080/get-faction-members\?factionID\=0

I'd also recommend testing the query with psql so you don't need to restart each time you change the query.

That might happen cause users table is empty

image

Once I added some users manually to the table this is what I get.

b-j-roberts commented 5 months ago

I see, thanks. So the users table won't always have usernames saved for all addresses, so it should be be setup to return an empty string as the username when that's the case. I think using COALESCE for the username should work, but might need to test it out

adrianvrj commented 5 months ago

I see, thanks. So the users table won't always have usernames saved for all addresses, so it should be be setup to return an empty string as the username when that's the case. I think using COALESCE for the username should work, but might need to test it out

Will test it out and lyk

adrianvrj commented 5 months ago

looking like this now without any users in the table!

image

@b-j-roberts

b-j-roberts commented 5 months ago

Great work, I appreciate the images showing your tests output