this post was submitted on 11 Jan 2025
4 points (100.0% liked)
Lemmy Apps
5586 readers
74 users here now
A home for discussion of Lemmy apps and tools for all platforms.
RULES:
- No spamming
- Be nice and have fun
- Follow the general lemmy.world rules
An extensive list of Lemmy apps is available here:
Visit our partner Communities!
Lemmy Plugins and Userscripts is a great place to enhance the Lemmy browsing experience. [email protected]
Lemmy Integrations is a community about all integrations with the lemmy API. Bots, Scripts, New Apps, etc. [email protected]
Lemmy Bots and Tools is a place to discuss and show off bots, tools, front ends, etc. you’re making that relate to lemmy. [email protected]
Lemmy App Development is a place for Lemmy builders to chat about building apps, clients, tools and bots for the Lemmy platform. [email protected]
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
To get the current logged-in user's details, that's actually retrieved from
/api/v3/site
for....reasons, I guess?Your function can remain the same, but change the api endpoint to
/site
Also, the user details will be in themy_user
key from get site response.Is there a reason you're not using the lemmy-js-client? That will take care of a lot of the low-level fetching for you (and has TypeDocs which help you to know what response / form data is needed).
Your Original Function, Slightly Modified
thanks! it works!
i didnt use lemmy-js-client because i dont know how to install it in github pages...