From b1cd134ee04104b436080232ea963b2646c6bda1 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 2 Dec 2024 14:42:46 +0000 Subject: [PATCH] Dev api. --- packages/server/src/api/controllers/application.ts | 1 - packages/server/src/api/controllers/dev.ts | 4 ++-- packages/types/src/api/web/dev.ts | 3 +++ packages/types/src/api/web/index.ts | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 packages/types/src/api/web/dev.ts diff --git a/packages/server/src/api/controllers/application.ts b/packages/server/src/api/controllers/application.ts index 9170ba54c6..3925df8ab0 100644 --- a/packages/server/src/api/controllers/application.ts +++ b/packages/server/src/api/controllers/application.ts @@ -68,7 +68,6 @@ import { ImportToUpdateAppRequest, ImportToUpdateAppResponse, SetRevertableAppVersionRequest, - SetRevertableAppVersionResponse, } from "@budibase/types" import { BASE_LAYOUT_PROP_IDS } from "../../constants/layouts" import sdk from "../../sdk" diff --git a/packages/server/src/api/controllers/dev.ts b/packages/server/src/api/controllers/dev.ts index 497da088c6..41e4a3a20a 100644 --- a/packages/server/src/api/controllers/dev.ts +++ b/packages/server/src/api/controllers/dev.ts @@ -11,7 +11,7 @@ import { db as dbCore, cache, } from "@budibase/backend-core" -import { App } from "@budibase/types" +import { App, Ctx, GetVersionResponse } from "@budibase/types" async function redirect( ctx: any, @@ -131,7 +131,7 @@ export async function revert(ctx: any) { } } -export async function getBudibaseVersion(ctx: any) { +export async function getBudibaseVersion(ctx: Ctx) { const version = envCore.VERSION ctx.body = { version, diff --git a/packages/types/src/api/web/dev.ts b/packages/types/src/api/web/dev.ts new file mode 100644 index 0000000000..f3195f58d3 --- /dev/null +++ b/packages/types/src/api/web/dev.ts @@ -0,0 +1,3 @@ +export interface GetVersionResponse { + version: string +} diff --git a/packages/types/src/api/web/index.ts b/packages/types/src/api/web/index.ts index 4c62d97daf..4021eafee8 100644 --- a/packages/types/src/api/web/index.ts +++ b/packages/types/src/api/web/index.ts @@ -18,3 +18,4 @@ export * from "./role" export * from "./plugins" export * from "./apikeys" export * from "./deployment" +export * from "./dev"