fix(httpapi): accept empty session create body (#24640)
This commit is contained in:
parent
dc6991e5a8
commit
55ecb06748
2 changed files with 27 additions and 3 deletions
|
|
@ -151,6 +151,14 @@ describe("session HttpApi", () => {
|
|||
await using tmp = await tmpdir({ git: true, config: { formatter: false, lsp: false, share: "disabled" } })
|
||||
const headers = { "x-opencode-directory": tmp.path, "content-type": "application/json" }
|
||||
|
||||
const createdEmpty = await json<Session.Info>(
|
||||
await app().request(SessionPaths.create, {
|
||||
method: "POST",
|
||||
headers,
|
||||
}),
|
||||
)
|
||||
expect(createdEmpty.id).toBeTruthy()
|
||||
|
||||
const created = await json<Session.Info>(
|
||||
await app().request(SessionPaths.create, {
|
||||
method: "POST",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue