Skip to content

Commit

Permalink
exapanging mail service
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan-g committed Nov 10, 2023
1 parent b420182 commit f8aecc3
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/features/children/children.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,27 @@ export class ChildrenController {
const preRegister = await this.childrenService.getChildPreRegisterById(
id,
);

if (
preRegister.status === PreRegisterStatusEnum.CONFIRMED ||
preRegister.status === PreRegisterStatusEnum.NOT_REGISTERED
) {
throw new ServerError('Pre register approval cou;d not go ahead!');
}
if (!voiceFile) {
throw new ServerError('we need the Edited Voice!');
}
const token =
config().dataCache.fetchPanelAuthentication(panelFlaskUserId).token;
const awakeFile = await this.downloadService.fileFromPath(
`http://localhost:8002/api/dao/children/avatars/images/${preRegister.awakeUrl}`,
process.env.NODE_ENV === 'development'
? `http://localhost:8002/api/dao/children/avatars/images/${preRegister.awakeUrl}`
: `https://nest.saydao.org/api/dao/children/avatars/images/${preRegister.awakeUrl}`,
`${preRegister.awakeUrl}`,
);
const sleptFile = await this.downloadService.fileFromPath(
`http://localhost:8002/api/dao/children/avatars/images/${preRegister.sleptUrl}`,
process.env.NODE_ENV === 'development'
? `http://localhost:8002/api/dao/children/avatars/images/${preRegister.sleptUrl}`
: `https://nest.saydao.org/api/dao/children/avatars/images/${preRegister.sleptUrl}`,
`${preRegister.sleptUrl}`,
);

Expand Down

0 comments on commit f8aecc3

Please sign in to comment.