Add endpoint for suggested instance (fixes #581) #586
Conversation
| "markdown-it-ruby": "^1.1.1", | ||
| "markdown-it-sub": "^2.0.0", | ||
| "markdown-it-sup": "^2.0.0", | ||
| "maxmind": "^5.0.5", |
There was a problem hiding this comment.
It seems like these two libraries are breaking the build: https://woodpecker.join-lemmy.org/repos/128/pipeline/1886/7
src/server/index.tsx
Outdated
| express.static(path.resolve("./dist/assets/lemmy_federation_context.json")), | ||
| ); | ||
| server.use("/feed.xml", express.static(path.resolve("./dist/feed.xml"))); | ||
| server.use("/api/v1/instances/suggested", suggested); |
There was a problem hiding this comment.
This has some overlap with the routes for api documentation.
dessalines
left a comment
There was a problem hiding this comment.
To me adding all the IP and geo stuff seems way overkill. Just serialize the suggested instances and ignore all the IP / location considerations.
|
We need that to find out which country the current user IP belongs to. How else do you propose to match the user and instance locations? |
f90515f to
93efcb4
Compare
|
Its up to you I spose, but really I'd rather this endpoint serialize all the recommended instances (including the suggested flag I added). To me the main use case of this endpoint, is so that apps don't have to hardcode a large list of instances in their dropdown for choosing an instance inside their app. The |
|
That can be a separate endpoint. Normally users shouldnt have to choose an instance manually at all, and simply use the suggested one. The signup UI I'm thinking about would look like this: Edit: Added endpoint |
No description provided.