mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-26 02:10:07 +00:00
UBERF-5280: Fix backup service (#4506)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
69ff8dd4c7
commit
a036f24856
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@ -277,7 +277,7 @@ jobs:
|
||||
env:
|
||||
DOCKER_CLI_HINTS: false
|
||||
- name: Login to Docker Hub
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }}
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: hardcoreeng
|
||||
|
@ -581,7 +581,7 @@ export async function listWorkspaces (db: Db, productId: string): Promise<Client
|
||||
return (await db.collection<Workspace>(WORKSPACE_COLLECTION).find(withProductId(productId, {})).toArray())
|
||||
.map((it) => ({ ...it, productId }))
|
||||
.filter((it) => it.disabled !== true)
|
||||
.map(mapToClientWorkspace)
|
||||
.map(trimWorkspaceInfo)
|
||||
}
|
||||
|
||||
/**
|
||||
@ -875,11 +875,21 @@ export async function getInviteLink (
|
||||
*/
|
||||
export type ClientWorkspaceInfo = Omit<Workspace, '_id' | 'accounts' | 'workspaceUrl'>
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export type WorkspaceInfo = Omit<Workspace, '_id' | 'accounts' | 'workspaceUrl'>
|
||||
|
||||
function mapToClientWorkspace (ws: Workspace): ClientWorkspaceInfo {
|
||||
const { _id, accounts, ...data } = ws
|
||||
return { ...data, workspace: ws.workspaceUrl ?? ws.workspace }
|
||||
}
|
||||
|
||||
function trimWorkspaceInfo (ws: Workspace): WorkspaceInfo {
|
||||
const { _id, accounts, ...data } = ws
|
||||
return { ...data }
|
||||
}
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user