Skip to content

Commit

Permalink
feat(links): add delete link api
Browse files Browse the repository at this point in the history
  • Loading branch information
wibus-wee committed Aug 1, 2022
1 parent e4f9767 commit 357a3bc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/modules/links/links.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
BadRequestException,
Body,
Controller,
Delete,
Get,
Param,
Patch,
Expand Down Expand Up @@ -94,4 +95,11 @@ export class LinksController {
async getFriendsFeed() {
return await this.linksService.getLinksRss();
}

@Delete("/:id")
@Auth()
@ApiOperation({ summary: "删除链接" })
async deleteLink(@Param("id") id) {
return await this.linksService.model.findByIdAndDelete(id);
}
}

0 comments on commit 357a3bc

Please sign in to comment.