refactor: Optimize Docker build process, switch to @node-rs/bcrypt, and streamline compose.yaml by removing external services.
All checks were successful
Build and Deploy Backend / Build Backend Docker Image (push) Successful in 45s
Build and Deploy Backend / Deploy E-learning Backend to Dev Server (push) Successful in 12s
Build and Deploy Backend / Notify Deployment Status (push) Successful in 1s

This commit is contained in:
JakkrapartXD 2026-02-10 15:26:39 +07:00
parent 18660fa364
commit c1254520b4
6 changed files with 218 additions and 405 deletions

View file

@ -3,7 +3,7 @@ import { Prisma } from '@prisma/client';
import { config } from '../config';
import { logger } from '../config/logger';
import jwt from 'jsonwebtoken';
import bcrypt from 'bcrypt';
import bcrypt from '@node-rs/bcrypt';
import {
UserResponse,
ProfileResponse,
@ -340,7 +340,7 @@ export class UserService {
// Create verification URL based on role
const isInstructor = user.role.code === 'INSTRUCTOR';
const baseUrl = isInstructor
const baseUrl = isInstructor
? (process.env.FRONTEND_URL_INSTRUCTOR || 'http://localhost:3001')
: (process.env.FRONTEND_URL_STUDENT || 'http://localhost:3000');
const verifyURL = `${baseUrl}/verify-email?token=${verifyToken}`;