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

feat: sky zoo #25

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

feat: sky zoo #25

wants to merge 5 commits into from

Conversation

ImLunaHey
Copy link
Collaborator

needed for #20

return useQuery({
queryKey: ['sky-zoo', { did }],
queryFn: async () => {
const response = await fetch(`https://skyzoo.blue/stats/plc/${did}`);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jycouet i get CORS errors when running this in tests. is there any chance the headers could be a little less restrictive?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are running test on what port ?

(I'm avoiding laptop until next Monday, but I'll do something)
Let me know ✌️

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a quick look, but don't manage to see the error test.
When I do npm run test, I don't get dirrectly failed test, I need to check the report. I'm missing something ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there any reason you're restricting the CORS at all? why not just set it to *?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was a bit worried about over usage... But you are right, I'll open it!
It should be working now with *

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test is still not ok ? 🧐

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you seeing any requests on your end? its weird because this only fails in the tests. if i try it in my browser it's fine. 🤔

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at "https://skyzoo.blue/stats/plc/did:plc:k6acu4chiwkixvdedcmdgmal".

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why is that in test env !
And don't manage to see "log" with "npm run test" I see the summary, but not live tests. It's a config issue ?

I'll look into it later 🤞

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we may need to merge with the test skipped and revisit it. it works in the browser and thats what really matters.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure
I let you do ✌️

Copy link

cloudflare-workers-and-pages bot commented Jan 2, 2025

Deploying akari with  Cloudflare Pages  Cloudflare Pages

Latest commit: b561528
Status: ✅  Deploy successful!
Preview URL: https://77f0ade6.akari-5j2.pages.dev
Branch Preview URL: https://luna-add-sky-zoo.akari-5j2.pages.dev

View logs

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

Successfully merging this pull request may close these issues.

2 participants