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

Fixed issue with retrieving collection contents #934

Merged
merged 1 commit into from
Mar 30, 2023

Conversation

pythonicode
Copy link
Contributor

@pythonicode pythonicode commented Feb 28, 2023

Ran some tests myself and this change makes it seem to work as intended. Maybe I misunderstood the purpose of the dirs map, but I couldn't find any bugs throughout testing.

curl -L -X GET "http://localhost:3004/collections/a8ced495-14c7-4482-873c-ce64f4e17446?dir=/" -H "Authorization: Bearer ESTec7837fa-c9d3-44e4-a4c2-bc12b7bcfd30ARY" -H 'Content-Type: application/json' -H 'Accept: application/json'
[{"name":"test","type":"directory","size":0,"contId":0,"dir":"/","coluuid":"a8ced495-14c7-4482-873c-ce64f4e17446","updatedAt":"2023-02-28T04:58:20.702276835Z"},{"name":"test2","type":"directory","size":0,"contId":0,"dir":"/","coluuid":"a8ced495-14c7-4482-873c-ce64f4e17446","updatedAt":"2023-02-28T04:58:32.425651744Z"}]
curl -X POST "http://localhost:3004/content/add?coluuid=a8ced495-14c7-4482-873c-ce64f4e17446&overwrite=true&dir=/test/test" -H "Authorization: Bearer AUTH_TOKEN" -H "Accept: application/json" -H "Content-Type: multipart/form-data" -F "data=@subfile.png"
{"cid":"bafkreiexna3d4uxvrywhrclxd2pepfacjnkftpdtnhfvdqd35on2fkkgt4","retrieval_url":"https://dweb.link/ipfs/bafkreiexna3d4uxvrywhrclxd2pepfacjnkftpdtnhfvdqd35on2fkkgt4","estuary_retrieval_url":"https://api.estuary.tech/gw/ipfs/bafkreiexna3d4uxvrywhrclxd2pepfacjnkftpdtnhfvdqd35on2fkkgt4","estuaryId":4,"providers":["/ip4/10.31.247.108/tcp/6744/p2p/12D3KooWGY9SYwzkuggkRKTmUhkjJ48JYUKCEJiyUyWdRtAmLNsB","/ip4/127.0.0.1/tcp/6744/p2p/12D3KooWGY9SYwzkuggkRKTmUhkjJ48JYUKCEJiyUyWdRtAmLNsB"]}
curl -L -X GET "http://localhost:3004/collections/a8ced495-14c7-4482-873c-ce64f4e17446?dir=/" -H "Authorization: Bearer AUTH_TOKEN" -H 'Content-Type: application/json' -H 'Accept: application/json'
[{"name":"test","type":"directory","size":0,"contId":0,"dir":"/","coluuid":"a8ced495-14c7-4482-873c-ce64f4e17446","updatedAt":"2023-02-28T04:58:20.702276835Z"},{"name":"test2","type":"directory","size":0,"contId":0,"dir":"/","coluuid":"a8ced495-14c7-4482-873c-ce64f4e17446","updatedAt":"2023-02-28T04:58:32.425651744Z"}]
curl -L -X GET "http://localhost:3004/collections/a8ced495-14c7-4482-873c-ce64f4e17446?dir=/test" -H "Authorization: Bearer AUTH_TOKEN" -H 'Content-Type: application/json' -H 'Accept: application/json'
[{"name":"subfile.png","type":"file","size":8820,"contId":1,"cid":"bafkreiexna3d4uxvrywhrclxd2pepfacjnkftpdtnhfvdqd35on2fkkgt4","dir":"/test","coluuid":"a8ced495-14c7-4482-873c-ce64f4e17446","updatedAt":"2023-02-28T04:58:20.702276835Z"},{"name":"..","type":"directory","size":0,"contId":0,"dir":"/test","coluuid":"a8ced495-14c7-4482-873c-ce64f4e17446","updatedAt":"2023-02-28T04:58:32.425651744Z"},{"name":"test","type":"directory","size":0,"contId":0,"dir":"/test","coluuid":"a8ced495-14c7-4482-873c-ce64f4e17446","updatedAt":"2023-02-28T05:47:30.698429035Z"}]

Copy link
Contributor

@10d9e 10d9e left a comment

Choose a reason for hiding this comment

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

LGTM - thank you for submitting

@pythonicode
Copy link
Contributor Author

Anyone know what's failing here?

@pythonicode pythonicode requested review from anjor and removed request for anjor March 8, 2023 19:00
@alvin-reyes alvin-reyes mentioned this pull request Mar 30, 2023
@alvin-reyes alvin-reyes merged commit 78ccf30 into application-research:dev Mar 30, 2023
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.

4 participants