File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1
1
import cors from 'cors' ;
2
2
import express , { Express } from 'express' ;
3
+ import { StatusCodes } from 'http-status-codes' ;
3
4
import { Keycloak } from 'keycloak-connect' ;
4
5
5
6
import { dependencies , version } from '../package.json' ;
@@ -31,9 +32,8 @@ import {
31
32
} from './middleware/cache' ;
32
33
import { injectBodyHttpHeaders } from './middleware/injectBodyHttpHeaders' ;
33
34
import { resolveSetIdMiddleware } from './middleware/resolveSetIdInSqon' ;
34
- import { sqonContainsSet , renameFieldToFieldName } from './sqon/manipulateSqon' ;
35
+ import { sqonContainsSet } from './sqon/manipulateSqon' ;
35
36
import { resolveSetsInSqon } from './sqon/resolveSetInSqon' ;
36
- import { StatusCodes } from 'http-status-codes' ;
37
37
38
38
export default ( keycloak : Keycloak , getProject : ( projectId : string ) => ArrangerProject ) : Express => {
39
39
const app = express ( ) ;
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ type OutputElement = {
11
11
} ;
12
12
13
13
type Output = {
14
- basics : OutputElement [ ] ;
15
- alloys : OutputElement [ ] ;
14
+ summary : OutputElement [ ] ;
15
+ operations : OutputElement [ ] ;
16
16
} ;
17
17
18
18
const builder = SQONBuilder ;
@@ -132,10 +132,10 @@ export const venn = async (sqons: string[]): Promise<Output> => {
132
132
return data . reduce (
133
133
( xs : Output , x : OutputElement ) => {
134
134
if ( [ 'Q₁' , 'Q₂' , 'Q₃' ] . some ( y => y === x . operation ) ) {
135
- return { ...xs , basics : [ ...xs . basics , x ] } ;
135
+ return { ...xs , summary : [ ...xs . summary , x ] } ;
136
136
}
137
- return { ...xs , alloys : [ ...xs . alloys , x ] } ;
137
+ return { ...xs , operations : [ ...xs . operations , x ] } ;
138
138
} ,
139
- { basics : [ ] , alloys : [ ] } ,
139
+ { summary : [ ] , operations : [ ] } ,
140
140
) ;
141
141
} ;
You can’t perform that action at this time.
0 commit comments