Spaces:
Running
Running
Update server.js
Browse files
server.js
CHANGED
|
@@ -45,6 +45,18 @@ async function findOrCreateFolder(drive, name, parentId = 'root') {
|
|
| 45 |
return folder.data;
|
| 46 |
}
|
| 47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
// 1. Login
|
| 49 |
app.post('/api/oauth/token', async (req, res) => {
|
| 50 |
try {
|
|
|
|
| 45 |
return folder.data;
|
| 46 |
}
|
| 47 |
|
| 48 |
+
// === THÊM ĐOẠN NÀY ĐỂ FIX LỖI "Cannot GET /" ===
|
| 49 |
+
app.get('/', (req, res) => {
|
| 50 |
+
res.send(`
|
| 51 |
+
<div style="font-family: sans-serif; text-align: center; padding-top: 50px;">
|
| 52 |
+
<h1 style="color: green;">QLVB Server is Running! 🚀</h1>
|
| 53 |
+
<p>Backend API đang hoạt động bình thường.</p>
|
| 54 |
+
<p>Trạng thái Google Auth: ${adminRefreshToken ? '<b style="color:blue">Đã kết nối</b>' : '<b style="color:red">Chưa đăng nhập</b>'}</p>
|
| 55 |
+
</div>
|
| 56 |
+
`);
|
| 57 |
+
});
|
| 58 |
+
// ================================================
|
| 59 |
+
|
| 60 |
// 1. Login
|
| 61 |
app.post('/api/oauth/token', async (req, res) => {
|
| 62 |
try {
|