Skip to content

Commit

Permalink
perf(posts): add @Auth() for searching api
Browse files Browse the repository at this point in the history
  • Loading branch information
wibus-wee committed Aug 22, 2022
1 parent 110f8a8 commit fb6fca1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/post/post.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,21 +157,21 @@ export class PostController {
}

@Patch("/createIndex")
// @Auth()
@Auth()
@ApiOperation({ summary: "创建或更新文章 json 索引" })
async createIndex() {
return await this.postService.createIndex();
}

@Get("/indexes")
// @Auth()
@Auth()
@ApiOperation({ summary: "获取文章索引" })
async getIndexes() {
return await this.redis.get("posts-index");
}

@Delete("/indexes")
// @Auth()
@Auth()
@ApiOperation({ summary: "删除文章索引" })
async deleteIndexes() {
return await this.redis.del("posts-index");
Expand Down

0 comments on commit fb6fca1

Please sign in to comment.