fix(web): wire up next-intl i18n — install dep, add locale middleware, wrap next config

The i18n architecture (config, routing, translation files, locale pages) was
already built but non-functional due to three missing pieces:
1. next-intl not listed in package.json
2. middleware.ts not using createMiddleware from next-intl/middleware
3. next.config.js not wrapped with createNextIntlPlugin

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Ho Ngoc Hai
2026-04-09 09:00:59 +07:00
parent b2d60e27db
commit 7f694e2e60
12 changed files with 176 additions and 70 deletions

View File

@@ -1,6 +1,6 @@
import { Inject, Logger } from '@nestjs/common';
import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs';
import { NotFoundException, ValidationException } from '@modules/shared/domain/domain-exception';
import { NotFoundException, ValidationException } from '@modules/shared';
import {
PAYMENT_REPOSITORY,
type IPaymentRepository,
@@ -50,7 +50,10 @@ export class RefundPaymentHandler implements ICommandHandler<RefundPaymentComman
});
if (result.success) {
payment.markRefunded();
const refundResult = payment.markRefunded();
if (refundResult.isErr) {
throw refundResult.unwrapErr();
}
await this.paymentRepo.update(payment);
}