Docs orders
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user