Skip to content
Snippets Groups Projects
Commit 0a868ce2 authored by ludovic Blanchet's avatar ludovic Blanchet
Browse files

Item 7444 - Remove Access-Contract header in /GET logbook API

parent 4e4c7ba7
No related branches found
No related tags found
No related merge requests found
......@@ -91,10 +91,9 @@ public class LogbookInternalController {
@Secured({ServicesData.ROLE_LOGBOOKS})
@PostMapping(value = CommonConstants.LOGBOOK_OPERATIONS_PATH)
public LogbookOperationsResponseDto findOperations(@RequestHeader(required = true, value = CommonConstants.X_TENANT_ID_HEADER) final Integer tenantId,
@RequestHeader(required = true, value = CommonConstants.X_ACCESS_CONTRACT_ID_HEADER) final String accessContractId,
@RequestBody final JsonNode select) throws VitamClientException {
SanityChecker.sanitizeJson(select);
final VitamContext vitamContext = securityService.buildVitamContext(tenantId, accessContractId);
final VitamContext vitamContext = securityService.buildVitamContext(tenantId);
return VitamRestUtils.responseMapping(logbookService.selectOperations(select, vitamContext).toJsonNode(), LogbookOperationsResponseDto.class);
}
......
......@@ -120,8 +120,8 @@ export class LogbookService {
}));
}
listOperationsBySelectQuery(query: VitamSelectQuery, accessContract: string, tenantIdentifier: number): Observable<Event[]> {
const headers = new HttpHeaders({ 'X-Tenant-Id': tenantIdentifier.toString(), 'X-Access-Contract-Id': accessContract });
listOperationsBySelectQuery(query: VitamSelectQuery, tenantIdentifier: number): Observable<Event[]> {
const headers = new HttpHeaders({ 'X-Tenant-Id': tenantIdentifier.toString() });
return this.logbookApi.findOperationsBySelectQuery(query, headers).pipe(
catchError(() => of({ $results: [] as Event[] })),
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment