Skip to content

Commit

Permalink
feat(links): patch link information api
Browse files Browse the repository at this point in the history
  • Loading branch information
wibus-wee committed Aug 1, 2022
1 parent d2e78e1 commit 34df7eb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/modules/links/links.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,18 @@ export class LinksController {
return await this.linksService.setFriendLinkStatus(id, status);
}

@Patch("/:id")
@ApiOperation({ summary: "修改链接信息" })
@Auth()
async updateMes(@Param() params, @Body() body) {
const { id } = params;
const status: LinksStatus = body.status ? body.status : LinksStatus.Pass;
return await this.linksService.model.findByIdAndUpdate(id, {
status,
...body,
})
}

@Auth()
@Get("/health")
@ApiOperation({ summary: "检查链接健康状态" })
Expand Down

0 comments on commit 34df7eb

Please sign in to comment.