Docs orders

This commit is contained in:
2026-04-27 09:33:55 +02:00
parent 9ec127433d
commit 4e02ea021d
32 changed files with 349 additions and 40 deletions

View File

@@ -32,14 +32,23 @@ export class OrderController {
}
public getByQueueId() {
return this.controllerGenerator<{ correlation_id: string }, { correlation_id: string }>({
return this.controllerGenerator<{ uuid: string }, { correlation_id: string }>({
validator: uuidValidator,
mapBody: (e) => ({ correlation_id: e.uuid }),
useCase: this.orderUseCases.getByQueueId(),
onError: (data, error) => { console.error(error) },
onSuccess: (data) => console.log(data)
})
}
public getByQuery() {
return this.controllerGenerator({
validator: undefined,
useCase: this.orderUseCases.getByQuery(),
onError: (data, error) => { console.error(error) },
onSuccess: (data) => console.log(data)
})
}
/**
* TODO:
@@ -77,7 +86,7 @@ export class OrderController {
})
}
// 2. Transformacion del body
// 2. Transformacion del body O => P
let data: P = body;
try {
if (args.mapBody != undefined)