mirror of
https://github.com/imputnet/cobalt.git
synced 2025-06-27 17:08:28 +00:00
api/processing/request: backwards compat with boolean localProcessing
This commit is contained in:
parent
28ab2747ce
commit
ac85ce86c0
@ -114,6 +114,11 @@ export function createResponse(responseType, responseData) {
|
||||
}
|
||||
|
||||
export function normalizeRequest(request) {
|
||||
// TODO: remove after backwards compatibility period
|
||||
if ("localProcessing" in request && typeof request.localProcessing === "boolean") {
|
||||
request.localProcessing = request.localProcessing ? "preferred" : "disabled";
|
||||
}
|
||||
|
||||
return apiSchema.safeParseAsync(request).catch(() => (
|
||||
{ success: false }
|
||||
));
|
||||
|
Loading…
Reference in New Issue
Block a user