samedche commited on
Commit
e11694e
·
verified ·
1 Parent(s): f78f19a

Update server.mjs

Browse files
Files changed (1) hide show
  1. server.mjs +2 -2
server.mjs CHANGED
@@ -130,13 +130,13 @@ const server = http.createServer(async (req, res) => {
130
  }
131
  }
132
 
133
- const jobMatch = url.pathname.match(/^\\/jobs\\/([a-f0-9-]+)$/);
134
  if (req.method === "GET" && jobMatch) {
135
  const job = jobs.get(jobMatch[1]);
136
  return job ? json(res, 200, job) : json(res, 404, { error: "job not found" });
137
  }
138
 
139
- const downloadMatch = url.pathname.match(/^\\/download\\/([a-f0-9-]+)$/);
140
  if (req.method === "GET" && downloadMatch) {
141
  const job = jobs.get(downloadMatch[1]);
142
  if (!job || job.status !== "ready") return json(res, 404, { error: "optimized file not ready" });
 
130
  }
131
  }
132
 
133
+ const jobMatch = url.pathname.match(/^\/jobs\/([a-f0-9-]+)$/);
134
  if (req.method === "GET" && jobMatch) {
135
  const job = jobs.get(jobMatch[1]);
136
  return job ? json(res, 200, job) : json(res, 404, { error: "job not found" });
137
  }
138
 
139
+ const downloadMatch = url.pathname.match(/^\/download\/([a-f0-9-]+)$/);
140
  if (req.method === "GET" && downloadMatch) {
141
  const job = jobs.get(downloadMatch[1]);
142
  if (!job || job.status !== "ready") return json(res, 404, { error: "optimized file not ready" });