Skip to content

Commit

Permalink
chore: stash
Browse files Browse the repository at this point in the history
  • Loading branch information
npmstudy committed Nov 15, 2023
1 parent ff442d1 commit ab44ca8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions packages/app/src/mw/cors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export class Cors extends Plugable {
this.init.push(this.a());
}
a() {
console.dir('register Cors');
return corsMiddleware(this.config);
}
}
5 changes: 2 additions & 3 deletions packages/app/src/mw/jwt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ import koajwt from 'koa-jwt';
export class Jwt extends Plugable {
constructor(cfg?) {
super(cfg);
console.dir('jwt = ');
console.dir(this.config);
// console.dir(this.config);

this.prefix = '';
this.name = 'jwt';
this.init.push(this.a());
}
a() {
console.dir(this.config);
console.dir('register jwt');
return koajwt(this.config).unless({ path: this.config.unless });
}
}
2 changes: 1 addition & 1 deletion packages/app/src/mw/serve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export class Serve extends Plugable {
this.init.push(this.a());
}
a() {
console.dir('serve');
console.dir('register Serve');
return serveMiddleware(this.config.root, this.config.opts);
}
}
3 changes: 2 additions & 1 deletion packages/app/src/mw/view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ export class View extends Plugable {
super(cfg);

this.prefix = '';
this.name = 'serve';
this.name = 'view';
this.init.push(this.a());
}
a() {
console.dir('register View');
return views(this.config?.root, this.config);
}
}

0 comments on commit ab44ca8

Please sign in to comment.