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

#OBS-I501 Updated the api structure #317

Merged
merged 1 commit into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion api-service/src/connections/commandServiceConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,5 @@ export const registerConnector = async (requestBody: any, userToken: string) =>
}

export const detectPII = async (requestBody: any, userToken: string) => {
console.log(`analyzePIIPath : ${analyzePIIPath}`)
return commandHttpService.post(analyzePIIPath, requestBody, { headers: { Authorization: userToken }})
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ export const dataAnalyzePII = async (req: Request, res: Response) => {
const apiId = _.get(req, 'id')
try {
const userToken = req.get('authorization') as string;
const piiSuggestionsResponse = await detectPII(_.get(req, ['body', 'data']), userToken);
const piiSuggestionsResponse = await detectPII(_.get(req, ['body', 'request']), userToken);
logger.info({apiId , message: `Detected PII successfully` })
ResponseHandler.successResponse(req, res, { status: httpStatus.OK, data: piiSuggestionsResponse?.data})
ResponseHandler.successResponse(req, res, { status: httpStatus.OK, data: _.get(piiSuggestionsResponse, ["data", "result"]) });
} catch (error: any) {
const errMessage = _.get(error, "response.data.detail")
logger.error(error, apiId, code);
Expand Down
Loading