Skip to content

Commit e2a2389

Browse files
committed
trying to fix vercel deployment
1 parent 8a52689 commit e2a2389

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

api/data-files.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ export default async function handler(req: VercelRequest, res: VercelResponse) {
7070

7171
if (Array.isArray(hfData)) {
7272
const huggingFaceFiles = hfData
73-
.filter(item => item.type === 'file' && item.path.endsWith('.csv'))
73+
.filter(item => item.type === 'file' && item.path && item.path.endsWith('.csv'))
7474
.map(file => ({
7575
filename: file.path,
7676
size: file.size || 0,
77-
modified: new Date(file.lastCommit?.date || Date.now()).toISOString(),
77+
modified: new Date().toISOString(),
7878
path: `/api/data-files/${encodeURIComponent(file.path)}`,
7979
downloadUrl: `https://huggingface.co/datasets/suryadev1/generated-csvs/resolve/main/${file.path}`,
8080
source: 'huggingface'

vercel.json

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
11
{
2-
"version": 2,
3-
"functions": {
4-
"api/data-files.ts": {
5-
"runtime": "@vercel/node"
6-
},
7-
"api/data-files/[filename].ts": {
8-
"runtime": "@vercel/node"
9-
}
10-
},
112
"routes": [
123
{ "handle": "filesystem" },
134
{ "src": "/api/(.*)", "dest": "/api/$1" },

0 commit comments

Comments
 (0)