refactor(worktree): remove async facade exports (#22369)
This commit is contained in:
parent
c2403d0f15
commit
36745caa2a
1 changed files with 303 additions and 249 deletions
|
|
@ -254,7 +254,7 @@ export const ExperimentalRoutes = lazy(() =>
|
|||
validator("json", Worktree.CreateInput.optional()),
|
||||
async (c) => {
|
||||
const body = c.req.valid("json")
|
||||
const worktree = await Worktree.create(body)
|
||||
const worktree = await AppRuntime.runPromise(Worktree.Service.use((svc) => svc.create(body)))
|
||||
return c.json(worktree)
|
||||
},
|
||||
)
|
||||
|
|
@ -301,7 +301,7 @@ export const ExperimentalRoutes = lazy(() =>
|
|||
validator("json", Worktree.RemoveInput),
|
||||
async (c) => {
|
||||
const body = c.req.valid("json")
|
||||
await Worktree.remove(body)
|
||||
await AppRuntime.runPromise(Worktree.Service.use((svc) => svc.remove(body)))
|
||||
await Project.removeSandbox(Instance.project.id, body.directory)
|
||||
return c.json(true)
|
||||
},
|
||||
|
|
@ -327,7 +327,7 @@ export const ExperimentalRoutes = lazy(() =>
|
|||
validator("json", Worktree.ResetInput),
|
||||
async (c) => {
|
||||
const body = c.req.valid("json")
|
||||
await Worktree.reset(body)
|
||||
await AppRuntime.runPromise(Worktree.Service.use((svc) => svc.reset(body)))
|
||||
return c.json(true)
|
||||
},
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue