Last parts of dev API.

This commit is contained in:
mike12345567 2024-12-02 16:40:50 +00:00
parent 78558bd0dc
commit 98de7e69d1
2 changed files with 17 additions and 3 deletions

View File

@ -11,7 +11,13 @@ import {
db as dbCore,
cache,
} from "@budibase/backend-core"
import { App, Ctx, GetVersionResponse } from "@budibase/types"
import {
App,
ClearDevLockResponse,
Ctx,
GetVersionResponse,
RevertAppResponse,
} from "@budibase/types"
async function redirect(
ctx: any,
@ -69,7 +75,7 @@ export function buildRedirectDelete(path: string) {
}
}
export async function clearLock(ctx: any) {
export async function clearLock(ctx: Ctx<void, ClearDevLockResponse>) {
const { appId } = ctx.params
try {
await redisClearLock(appId, ctx.user)
@ -81,7 +87,7 @@ export async function clearLock(ctx: any) {
}
}
export async function revert(ctx: any) {
export async function revert(ctx: Ctx<void, RevertAppResponse>) {
const { appId } = ctx.params
const productionAppId = dbCore.getProdAppID(appId)

View File

@ -1,3 +1,11 @@
export interface GetVersionResponse {
version: string
}
export interface ClearDevLockResponse {
message: string
}
export interface RevertAppResponse {
message: string
}