mirror of
https://github.com/nestriness/nestri.git
synced 2025-12-12 16:55:37 +02:00
merge
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
"typescript": "^5.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@openauthjs/openauth": "^0.3.9",
|
||||
"@openauthjs/openauth": "0.4.3",
|
||||
"hono": "^4.6.15",
|
||||
"hono-openapi": "^0.3.1",
|
||||
"partysocket": "1.0.3"
|
||||
|
||||
@@ -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