ci: fix build [skip-cache]

This commit is contained in:
undefined committed 2023-06-08 00:18:10 +08:00
1 parent 38a72d1b5b
commit 1b5f8a5493
5 files changed
+9 -6

No files matched your search

+1 -1
View File
@@ -80,7 +80,7 @@ async function get(ctx: Context) {
async function post(ctx: Context) {
const {
host, port, name, username, password,
} = ctx.request.body;
} = (ctx.request as any).body;
let mongourl = 'mongodb://';
if (username) mongourl += `${username}:${password}@`;
mongourl += `${host}:${port}/${name}`;
+2
View File
@@ -2,6 +2,7 @@ import http from 'http';
import { tmpdir } from 'os';
import { join, resolve } from 'path';
import cac from 'cac';
import type { Files } from 'formidable';
import fs from 'fs-extra';
import Koa from 'koa';
import Body from 'koa-body';
@@ -83,6 +84,7 @@ interface HydroContext {
export interface KoaContext extends Koa.Context {
HydroContext: HydroContext;
handler: any;
request: Koa.Request & { body: any, files: Files };
session: Record<string, any>;
render: (name: string, args: any) => Promise<void>;
renderHTML: (name: string, args: any) => Promise<string>;