create-dp-koa 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -38,6 +38,7 @@ const PRESERVE_RELATIVE_PATHS = [
|
|
|
38
38
|
'src/controllers/demo/AnnotationDemoController.ts',
|
|
39
39
|
'src/controllers/example/ExampleController.ts',
|
|
40
40
|
'src/controllers/example/EnterpriseExampleController.ts',
|
|
41
|
+
'src/plugins/weboffice/http/routes.ts',
|
|
41
42
|
];
|
|
42
43
|
|
|
43
44
|
function shouldCopySource(absSrc, baseRoot) {
|
|
@@ -33,7 +33,7 @@ function registerUnderPrefix(router: Router, basePath: string): void {
|
|
|
33
33
|
router.post(`${base}/files`, async (ctx) => {
|
|
34
34
|
try {
|
|
35
35
|
const woCtx = parseWebOfficeContext(ctx);
|
|
36
|
-
const body = (ctx.request.body as any) || {};
|
|
36
|
+
const body = ((ctx.request as any).body as any) || {};
|
|
37
37
|
const name = body.name || "未命名文档";
|
|
38
38
|
const projectId = body.project_id != null ? Number(body.project_id) : undefined;
|
|
39
39
|
const data = await service.createDocument(woCtx, name, projectId);
|