Skip to content

Commit

Permalink
Merge pull request #204 from Sanketika-Obsrv/v2-apis-create
Browse files Browse the repository at this point in the history
#OBS-I116: Dataset create api fixes
  • Loading branch information
SanthoshVasabhaktula authored Jul 15, 2024
2 parents fb51360 + 781c8af commit fd74dc1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion api-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"body-parser": "^1.20.2",
"compression": "^1.7.4",
"dateformat": "2.0.0",
"express": "^4.18.2",
"express": "^5.0.0-beta.3",
"http-errors": "^2.0.0",
"http-status": "^1.5.3",
"kafka-node": "^5.0.0",
Expand Down
3 changes: 1 addition & 2 deletions api-service/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ app.use(bodyParser.json({ limit: config.body_parser_limit}));
app.use(express.text());
app.use(express.json());
app.use(errorHandler)
app.use(obsrvErrorHandler);
app.set("queryServices", services);

loadExtensions(app)
Expand All @@ -35,7 +34,7 @@ loadExtensions(app)
app.use("/", router);
app.use("/", metricsRouter);
app.use("*", ResponseHandler.routeNotFound);
app.use(ResponseHandler.errorResponse);
app.use(obsrvErrorHandler);

app.listen(config.api_port, () => {
console.log(`listening on port ${config.api_port}`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const validateRequest = async (req: Request) => {

const datasetCreate = async (req: Request, res: Response) => {

validateRequest(req)
await validateRequest(req)
const draftDataset = getDraftDataset(req.body.request)
const dataset = await datasetService.createDraftDataset(draftDataset);
ResponseHandler.successResponse(req, res, { status: httpStatus.OK, data: dataset });
Expand Down

0 comments on commit fd74dc1

Please sign in to comment.