refactor: photo endpoints, mutex fixes, makefile updates #363
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
refator(api): use /profile/photo & /profile/poster as vanity enapoints
Similar to the situation we ran into shipping the webapp, readonly mode can and should prevent access to anything under the
/ipfs/
endpoint, which sadly includes profile photos & poster images. To get around this we'll use the same trick of hiding photos behind vanity urls.In an effort to avoid API bloat, I've added these as elements of the previously under-used /profile/photo & /profile/poster GET endpoints. Both now accept query params for id (which is the profile ID) or peerneme. this is going to need some refinement & docs, but it'll work for now.
I've also removed .png image formats for posters & profiles so that these endpoints have an easy story for providing
Content-Type
headers.Examples:
We should update the frontend to use these instead of the raw ipfs hashes, that way it'll work in both readonly and writable modes.
Other Fixes