Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RD-1291 Introduced TS to backend #1575

Merged
merged 34 commits into from
Sep 7, 2021
Merged
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
d447df2
Introduced TS to backend
Sep 1, 2021
00dea5f
Merge branch 'master' into RD-1291-backend-ts
kubama Sep 1, 2021
32264d8
Removed webpack config dependency on backend/consts.ts
Sep 1, 2021
7f17a66
Merge branch 'RD-1291-backend-ts' of github.com:cloudify-cosmo/cloudi…
Sep 1, 2021
955d4f5
Fixed eslint error
Sep 1, 2021
724e8a0
Corrected route implementation
Sep 1, 2021
8205b8e
Updated reference commit for coverage check
Sep 1, 2021
c8db33a
Minor update to ensure non-empty change set for coverage check
Sep 1, 2021
1d64531
Added lodash typings
Sep 1, 2021
b81a37f
Fixed devServer
Sep 1, 2021
08351fd
Extended backend startup timeout
Sep 1, 2021
244cf05
Fixed logger widget backend helper
Sep 2, 2021
ed1713f
Merge branch 'master' into RD-1291-backend-ts
kubama Sep 2, 2021
9267de2
Added test to satisfy coverage check
Sep 2, 2021
3b564ee
Merge branch 'RD-1291-backend-ts' of github.com:cloudify-cosmo/cloudi…
Sep 2, 2021
c6116e4
Merge branch 'master' into RD-1291-backend-ts
kubama Sep 2, 2021
df0e842
Corrected accidental change
Sep 2, 2021
78987c1
Merge branch 'RD-1291-backend-ts' of github.com:cloudify-cosmo/cloudi…
Sep 2, 2021
02e338d
Added -T flag to ts-node invocations
Sep 2, 2021
64d8ffc
Migrated devServer to TS
Sep 3, 2021
ecb665d
Changed devServer extension
Sep 3, 2021
2c8f690
Merge branch 'master' into RD-1291-backend-ts
kubama Sep 3, 2021
8194f60
Fixed devTrace npm script
Sep 3, 2021
e7377cb
Merge branch 'RD-1291-backend-ts' of github.com:cloudify-cosmo/cloudi…
Sep 3, 2021
bbb0b1f
Fixed typo in test name
kubama Sep 3, 2021
cdffc1f
Merge branch 'master' into RD-1291-backend-ts
kubama Sep 3, 2021
44ae37c
Fixed SAML config validation, added test
Sep 3, 2021
05a08d4
Merge branch 'RD-1291-backend-ts' of github.com:cloudify-cosmo/cloudi…
Sep 3, 2021
6f50a30
Aligned project references configuration
Sep 6, 2021
8a4158f
Merge branch 'master' into RD-1291-backend-ts
kubama Sep 6, 2021
5b5a2c8
Added separate check-types scripts for frontend and backend
kubama Sep 6, 2021
6b67ed4
Reused more consts
Sep 6, 2021
aa1dacd
Merge branch 'RD-1291-backend-ts' of github.com:cloudify-cosmo/cloudi…
Sep 6, 2021
6b84796
Merge branch 'master' into RD-1291-backend-ts
kubama Sep 7, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions backend/routes/Filters.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
// @ts-nocheck File not migrated fully to TS

import express from 'express';
import passport from 'passport';

import { callService } from '../handler/BackendHandler';

import { getLogger } from '../handler/LoggerHandler';

const logger = getLogger('WidgetBackend');
import { getFilterUsage } from '../handler/FilterHandler';

const router = express.Router();

router.use(passport.authenticate('token', { session: false }));

router.use('/:service', (req, res, next) => {
logger.debug(
`${req.method} request on service '${req.params.service}' called with parameters: ${JSON.stringify(req.query)}`
);
return callService(req.params.service, req.method, req, res, next).catch(next);
router.get('/usage/:filterId', (req, res, next) => {
stepek marked this conversation as resolved.
Show resolved Hide resolved
getFilterUsage(req.params.filterId)
.then(result => res.send(result))
.catch(next);
});

export default router;