redo reverts code (when possible) (#75)

This commit is contained in:
Will Chen
2025-05-02 14:55:46 -07:00
committed by GitHub
parent 5fc49231ee
commit 46cb7ca577
4 changed files with 49 additions and 2 deletions

View File

@@ -494,6 +494,7 @@ export function registerAppHandlers() {
_,
{ appId, previousVersionId }: { appId: number; previousVersionId: string }
) => {
logger.log(`Reverting to version ${previousVersionId} for app ${appId}`);
return withLock(appId, async () => {
const app = await db.query.apps.findFirst({
where: eq(apps.id, appId),