1
0
Fork 0
mirror of synced 2024-06-26 18:10:51 +12:00
budibase/packages/worker/src/api/controllers/system/restore.ts

14 lines
397 B
TypeScript

import env from "../../../environment"
import { BBContext } from "@budibase/types"
import { cache } from "@budibase/backend-core"
export async function systemRestored(ctx: BBContext) {
if (!env.SELF_HOSTED) {
ctx.throw(405, "This operation is not allowed in cloud.")
}
await cache.bustCache(cache.CacheKeys.CHECKLIST)
ctx.body = {
message: "System prepared after restore.",
}
}