fix: gộp các nút của thành viên và guest vào một

This commit is contained in:
2026-06-27 15:37:00 +07:00
parent 5f49070a98
commit 400a3d098d
33 changed files with 1142 additions and 250 deletions
+16 -1
View File
@@ -114,6 +114,21 @@ async function bootstrap() {
prefix: '/uploads/',
});
// Tự động tạo thư mục downloads nếu chưa tồn tại
const downloadsDir = path.join(process.cwd(), 'public/downloads');
if (!fs.existsSync(downloadsDir)) {
fs.mkdirSync(downloadsDir, { recursive: true });
}
// Khai báo thư mục lưu trữ APK tải về
app.useStaticAssets(downloadsDir, {
prefix: '/downloads/',
setHeaders: (res) => {
res.set('Content-Type', 'application/vnd.android.package-archive');
res.set('Content-Disposition', 'attachment; filename="yotrip-latest.apk"');
}
});
const prisma = app.get(PrismaService);
startAutoCleanup(prisma);
@@ -2463,7 +2478,7 @@ class UserController {
return this.prisma.user.update({
where: { id },
data,
select: { id: true, email: true, name: true, isAdmin: true, isBlocked: true }
select: { id: true, email: true, name: true, isAdmin: true, isBlocked: true, avatar: true, phone: true, address: true }
});
}