mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 23:28:11 +00:00
:wqMerge branch 'freight/feature/vehicle_2' of github.com:Tria-plc/edr-platform into freight/feature/vehicle_2
This commit is contained in:
@@ -44,14 +44,19 @@ export class ResponseTransformInterceptor<T> implements NestInterceptor<
|
|||||||
if (
|
if (
|
||||||
shouldFlatten &&
|
shouldFlatten &&
|
||||||
data &&
|
data &&
|
||||||
typeof data === "object" &&
|
typeof data === "object"
|
||||||
!Array.isArray(data)
|
|
||||||
) {
|
) {
|
||||||
return {
|
if(!Array.isArray(data)){
|
||||||
success: true,
|
|
||||||
...data,
|
return {
|
||||||
timestamp: new Date().toISOString(),
|
success: true,
|
||||||
};
|
...data,
|
||||||
|
timestamp: new Date().toISOString(),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(path.startsWith("/api/positions/hierarchy") || path.startsWith("/api/positions/current")){
|
if(path.startsWith("/api/positions/hierarchy") || path.startsWith("/api/positions/current")){
|
||||||
|
|||||||
Reference in New Issue
Block a user