Skip to content

Commit

Permalink
fix:接口返回添加状态码
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoujingang committed Mar 14, 2021
1 parent 5fc47c1 commit c8c2030
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/controller/blogger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ export class APIController {
const rn = Number(query.rn) || 10;
const condition = {};
const res = await this.blogerService.getList(condition, (pn - 1) * rn,rn);
return { success: true, message: 'OK', data: res };
return { code: 200, message: 'OK', data: res };
}

@Post('/add')
async add(@Body(ALL) body: any) {
const res = await this.blogerService.add(body);
return { success: true, message: 'OK', data: res };
return { code: 200, message: 'OK', data: res };

}
}

0 comments on commit c8c2030

Please sign in to comment.