Skip to content

Commit

Permalink
Merge pull request #57 from richard483/fix-1
Browse files Browse the repository at this point in the history
updated job controller access guard & 'biaya aplikasi'
  • Loading branch information
richard483 authored Jan 17, 2024
2 parents 5355eac + 5dfcec3 commit a97dadc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "backend-8tech",
"version": "4.0.8",
"version": "4.0.9",
"description": "",
"author": "8tech",
"private": true,
Expand Down
4 changes: 0 additions & 4 deletions src/job/job.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,13 @@ export class JobController {

@ApiBearerAuth()
@ApiParam({ name: 'jobId', type: String })
@Roles(Role.USER)
@UseGuards(JwtAuthGuard, RoleGuard)
@Get('/:jobId')
async getjob(@Res() res, @Param() params: any) {
const response = await this.jobService.getById(params.jobId);
return response;
}

@ApiBearerAuth()
@Roles(Role.USER)
@UseGuards(JwtAuthGuard, RoleGuard)
@Post('filter')
async filter(@Res() res, @Body() data: JobFilterRequest) {
const response = await this.jobService.findManyByList(data);
Expand Down
6 changes: 5 additions & 1 deletion src/payment/payment.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,15 @@ export class PaymentService {
paymentRequset: PaymentRequestCreateDto,
contractId?: string,
): Promise<IPaymentData> {
const totalAmount: number = Math.ceil(
(100 + Number(`${process.env.BIAYA_APLIKASI}`)) *
(paymentRequset.amount / 100),
);
const xenditPaymentRequest: PaymentRequest =
await this.xenditClient.PaymentRequest.createPaymentRequest({
data: {
currency: 'IDR',
amount: paymentRequset.amount,
amount: totalAmount,
paymentMethod: {
type: 'EWALLET',
reusability: 'ONE_TIME_USE',
Expand Down

0 comments on commit a97dadc

Please sign in to comment.