refactor(httpapi): describe bodyless global upgrade payload

This commit is contained in:
Kit Langton
2026-05-25 16:18:31 -04:00
committed by GitHub
parent b46cec2a7d
commit 775321173d
2 changed files with 65 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ import { BusEvent } from "@/bus/bus-event"
import { SyncEvent } from "@/sync"
import "@/server/event"
import { Schema } from "effect"
import { HttpApi, HttpApiEndpoint, HttpApiError, HttpApiGroup, OpenApi } from "effect/unstable/httpapi"
import { HttpApi, HttpApiEndpoint, HttpApiError, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/unstable/httpapi"
import { described } from "./metadata"
const GlobalHealth = Schema.Struct({
@@ -92,7 +92,7 @@ export const GlobalApi = HttpApi.make("global").add(
}),
),
HttpApiEndpoint.post("upgrade", GlobalPaths.upgrade, {
payload: GlobalUpgradeInput,
payload: [HttpApiSchema.NoContent, GlobalUpgradeInput],
success: described(GlobalUpgradeResult, "Upgrade result"),
error: HttpApiError.BadRequest,
}).annotateMerge(