PR comments.
This commit is contained in:
parent
467bdcf74c
commit
1b15ef3b7e
|
@ -2,7 +2,7 @@ import { outputProcessing } from "../../utilities/rowProcessor"
|
|||
import { InternalTables } from "../../db/utils"
|
||||
import { getFullUser } from "../../utilities/users"
|
||||
import { roles, context, db as dbCore } from "@budibase/backend-core"
|
||||
import { AppSelfResponse, ContextUser, Row, UserCtx } from "@budibase/types"
|
||||
import { AppSelfResponse, ContextUser, UserCtx } from "@budibase/types"
|
||||
import sdk from "../../sdk"
|
||||
import { processUser } from "../../utilities/global"
|
||||
|
||||
|
@ -45,7 +45,7 @@ export async function fetchSelf(ctx: UserCtx<void, AppSelfResponse>) {
|
|||
try {
|
||||
const userTable = await sdk.tables.getTable(InternalTables.USER_METADATA)
|
||||
// specifically needs to make sure is enriched
|
||||
ctx.body = (await outputProcessing(userTable, user as Row)) as ContextUser
|
||||
ctx.body = await outputProcessing(userTable, user)
|
||||
} catch (err: any) {
|
||||
let response: ContextUser | {}
|
||||
// user didn't exist in app, don't pretend they do
|
||||
|
|
|
@ -126,6 +126,9 @@ export async function deploymentProgress(
|
|||
try {
|
||||
const db = context.getAppDB()
|
||||
const deploymentDoc = await db.get<DeploymentDoc>(DocumentType.DEPLOYMENTS)
|
||||
if (!deploymentDoc.history?.[ctx.params.deploymentId]) {
|
||||
ctx.throw(404, "No deployment found")
|
||||
}
|
||||
ctx.body = deploymentDoc.history?.[ctx.params.deploymentId]
|
||||
} catch (err) {
|
||||
ctx.throw(
|
||||
|
|
|
@ -2,13 +2,11 @@ import { DeploymentDoc, DeploymentStatus } from "../../documents"
|
|||
|
||||
export interface PublishAppResponse extends DeploymentDoc {}
|
||||
|
||||
export type DeploymentProgressResponse =
|
||||
| {
|
||||
_id: string
|
||||
appId: string
|
||||
status?: DeploymentStatus
|
||||
updatedAt: number
|
||||
}
|
||||
| undefined
|
||||
export interface DeploymentProgressResponse {
|
||||
_id: string
|
||||
appId: string
|
||||
status?: DeploymentStatus
|
||||
updatedAt: number
|
||||
}
|
||||
|
||||
export type FetchDeploymentResponse = DeploymentProgressResponse[]
|
||||
|
|
Loading…
Reference in New Issue