make submit form not require JS.

This commit is contained in:
Jason Schwarzenberger
2020-12-04 16:16:05 +13:00
parent 33a25fa34e
commit 6459d07ce5
9 changed files with 30 additions and 14 deletions

View File

@@ -10,7 +10,7 @@ export async function get(req, res) {
limit: req.query.limit || 20,
};
const response = await fetch(`${API_URL}/api?skip=${skip}&limit=${limit}`);
res.writeHead(response.status, { 'Content-Type': 'application/json' });
res.writeHead(response.status, { 'Content-Type': response.headers.get('Content-Type') });
if (!response.ok) {
return res.end(await response.text());
}