mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-11-10 17:00:11 +01:00
1711 enhance workspace users api (#1712)
* Update workspace.js adds userId to the workspaceUsers function * Update openapi.json Updates the workspace/users API docs to display correct 200 response example, including userId, username, role and last update datetime.
This commit is contained in:
parent
1c473621aa
commit
6c68bdbd51
@ -232,6 +232,7 @@ const Workspace = {
|
||||
const userInfo = usersById.map((user) => {
|
||||
const workspaceUser = users.find((u) => u.user_id === user.id);
|
||||
return {
|
||||
userId: user.id,
|
||||
username: user.username,
|
||||
role: user.role,
|
||||
lastUpdatedAt: workspaceUser.lastUpdatedAt,
|
||||
|
@ -530,11 +530,15 @@
|
||||
"users": [
|
||||
{
|
||||
"userId": 1,
|
||||
"role": "admin"
|
||||
"username" : "user_1",
|
||||
"role": "admin",
|
||||
"lastUpdatedAt" : "2024-06-10T12:37:52.128Z"
|
||||
},
|
||||
{
|
||||
"userId": 2,
|
||||
"role": "member"
|
||||
"username" : "user_2",
|
||||
"role": "member",
|
||||
"lastUpdatedAt" : "2024-06-12T19:10:07.529Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -2456,4 +2460,4 @@
|
||||
"BearerAuth": []
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user