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:
lewismacnow 2024-06-18 17:35:40 +01:00 committed by GitHub
parent 1c473621aa
commit 6c68bdbd51
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 3 deletions

View File

@ -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,

View File

@ -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": []
}
]
}
}