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