Skip to content

Commit

Permalink
format the code
Browse files Browse the repository at this point in the history
  • Loading branch information
Behzad-rabiei committed Apr 24, 2024
1 parent 3f2d580 commit 465ad00
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions src/controllers/platform.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ const logger = parentLogger.child({ module: 'PlatformController' });

const createPlatform = catchAsync(async function (req: IAuthRequest, res: Response) {
const community = req.community;
// await platformService.checkPlatformAlreadyConnected(community?.id, req.body);
// await platformService.checkSinglePlatformConnection(community?.id, req.body);
// const platform = await platformService.reconnectOrAddNewPlatform(community?.id, req.body);
const platform = await platformService.managePlatformConnection(community?.id, req.body);
res.status(httpStatus.CREATED).send(platform);
});
Expand Down
2 changes: 1 addition & 1 deletion src/services/platform.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ const managePlatformConnection = async (
platformData: IPlatform,
): Promise<HydratedDocument<IPlatform>> => {
if (!platformData.metadata) {
throw new ApiError(httpStatus.BAD_REQUEST, `Metadata is Missing!`);
throw new ApiError(httpStatus.BAD_REQUEST, `Metadata is Missing for the '${platformData.name}!`);
}

const metadataKey = getMetadataKey(platformData.name);
Expand Down

0 comments on commit 465ad00

Please sign in to comment.