mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
ci: fix build [skip-cache]
This commit is contained in:
5 files changed
+9
-6
No files matched your search
@@ -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,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>;
|
||||
|
||||
Reference in new issue
Block a user