mirror of
https://github.com/nestriness/nestri.git
synced 2025-12-12 08:45:38 +02:00
⭐ feat(www): Finish up on the onboarding (#202)
## Description This is an attempt to finish up on the onboarding and creating a team ## Type of Change - [ ] Bug fix (non-breaking change) - [x] New feature (non-breaking change) - [ ] Breaking change (fix or feature that changes existing functionality) - [ ] Documentation update - [ ] Other (please describe): ## Checklist - [ ] I have updated relevant documentation - [x] My code follows the project's coding style - [x] My changes generate no new warnings/errors
This commit is contained in:
@@ -42,8 +42,10 @@ export module AccountApi {
|
||||
}),
|
||||
async (c) => {
|
||||
const actor = assertActor("user");
|
||||
const currentUser = await User.fromID(actor.properties.userID)
|
||||
if (!currentUser) return c.json({ error: "This account does not exist, it may have been deleted" }, 404)
|
||||
const [currentUser, teams] = await Promise.all([User.fromID(actor.properties.userID), User.teams()])
|
||||
|
||||
if (!currentUser) return c.json({ error: "This account does not exist; it may have been deleted" }, 404)
|
||||
|
||||
const { id, email, name, polarCustomerID, avatarUrl, discriminator } = currentUser
|
||||
|
||||
return c.json({
|
||||
@@ -51,10 +53,10 @@ export module AccountApi {
|
||||
id,
|
||||
email,
|
||||
name,
|
||||
teams,
|
||||
avatarUrl,
|
||||
discriminator,
|
||||
polarCustomerID,
|
||||
teams: await User.teams(),
|
||||
}
|
||||
}, 200);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user