Skip to content

Commit 9dcc268

Browse files
committed
📝 Change naming in venn response
1 parent 3229d7f commit 9dcc268

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/app.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import cors from 'cors';
22
import express, { Express } from 'express';
3+
import { StatusCodes } from 'http-status-codes';
34
import { Keycloak } from 'keycloak-connect';
45

56
import { dependencies, version } from '../package.json';
@@ -31,9 +32,8 @@ import {
3132
} from './middleware/cache';
3233
import { injectBodyHttpHeaders } from './middleware/injectBodyHttpHeaders';
3334
import { resolveSetIdMiddleware } from './middleware/resolveSetIdInSqon';
34-
import { sqonContainsSet, renameFieldToFieldName } from './sqon/manipulateSqon';
35+
import { sqonContainsSet } from './sqon/manipulateSqon';
3536
import { resolveSetsInSqon } from './sqon/resolveSetInSqon';
36-
import { StatusCodes } from 'http-status-codes';
3737

3838
export default (keycloak: Keycloak, getProject: (projectId: string) => ArrangerProject): Express => {
3939
const app = express();

src/endpoints/venn/venn.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ type OutputElement = {
1111
};
1212

1313
type Output = {
14-
basics: OutputElement[];
15-
alloys: OutputElement[];
14+
summary: OutputElement[];
15+
operations: OutputElement[];
1616
};
1717

1818
const builder = SQONBuilder;
@@ -132,10 +132,10 @@ export const venn = async (sqons: string[]): Promise<Output> => {
132132
return data.reduce(
133133
(xs: Output, x: OutputElement) => {
134134
if (['Q₁', 'Q₂', 'Q₃'].some(y => y === x.operation)) {
135-
return { ...xs, basics: [...xs.basics, x] };
135+
return { ...xs, summary: [...xs.summary, x] };
136136
}
137-
return { ...xs, alloys: [...xs.alloys, x] };
137+
return { ...xs, operations: [...xs.operations, x] };
138138
},
139-
{ basics: [], alloys: [] },
139+
{ summary: [], operations: [] },
140140
);
141141
};

0 commit comments

Comments
 (0)