Skip to content

Commit

Permalink
PR comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
mike12345567 committed Dec 3, 2024
1 parent 467bdcf commit 1b15ef3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions packages/server/src/api/controllers/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions packages/server/src/api/controllers/deploy/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
14 changes: 6 additions & 8 deletions packages/types/src/api/web/deployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[]

0 comments on commit 1b15ef3

Please sign in to comment.