Skip to content

Commit

Permalink
fix: deno type (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
yosuke-furukawa committed Jan 28, 2021
1 parent a7b0ebb commit 7e6b6cf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions webapp/deno/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -572,12 +572,12 @@ router.get("/api/recommended_estate/:id", async (ctx) => {
router.post("/api/chair", async (ctx) => {
try {
const form = await multiParser(ctx.request.serverRequest);
if (!form || !form.chairs) {
if (!form || !form.fields.chairs) {
ctx.response.status = 400;
ctx.response.body = "Bad Request";
return;
}
const content = decoder.decode((form.chairs as any).content);
const content = decoder.decode((form.fields.chairs as any).content);
const csv = await parse(content);
await db.transaction(async (conn) => {
for (let i = 0; i < csv.length; i++) {
Expand All @@ -599,12 +599,12 @@ router.post("/api/chair", async (ctx) => {
router.post("/api/estate", async (ctx) => {
try {
const form = await multiParser(ctx.request.serverRequest);
if (!form || !form.estates) {
if (!form || !form.fields.estates) {
ctx.response.status = 400;
ctx.response.body = "Bad Request";
return;
}
const content = decoder.decode((form.estates as any).content);
const content = decoder.decode((form.fields.estates as any).content);
const csv = await parse(content);
await db.transaction(async (conn) => {
for (let i = 0; i < csv.length; i++) {
Expand Down

0 comments on commit 7e6b6cf

Please sign in to comment.