Skip to content

Commit

Permalink
[wip] fixing the bug of reading requests
Browse files Browse the repository at this point in the history
  • Loading branch information
xzyaoi committed Nov 6, 2018
1 parent 455eb59 commit 24fe39d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
9 changes: 2 additions & 7 deletions discovery/src/controller/package.ts
Expand Up @@ -3,13 +3,8 @@ import { Package } from '../dynamo/entity';
import { importPackageRequest } from './entity'
export default class PackageController {
public static async importPackage (ctx: Context) {
const toImportPackage : Package = new Package();
console.log(typeof(ctx.request.body));

let ipr:importPackageRequest;
Object.assign(ipr, ctx.request.body);
toImportPackage.isSymbol = true;
toImportPackage.linkedTo = ipr.linkedTo;
const toImportPackage:Package = new Package();

console.log(toImportPackage)
}
}
1 change: 1 addition & 0 deletions discovery/src/dynamo/entity.ts
Expand Up @@ -21,6 +21,7 @@ class Package {

@attribute()
linkedTo: string;

}

export {
Expand Down
4 changes: 2 additions & 2 deletions discovery/tsconfig.json
Expand Up @@ -10,9 +10,9 @@
"emitDecoratorMetadata": true,
"moduleResolution": "node",
"typeRoots": [
"node_modules/koa-bodyparser",
"node_modules/**/*",
"node_modules/@types",
"node_modules/koa-bodyparser"
"node_modules/@types"
],
"lib": [
"es2017",
Expand Down

0 comments on commit 24fe39d

Please sign in to comment.