Skip to content

Commit

Permalink
feat(theme): basic props for pages
Browse files Browse the repository at this point in the history
  • Loading branch information
wibus-wee committed Aug 14, 2022
1 parent 00be7c8 commit 8f23678
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/modules/theme/theme.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,25 @@ export class ThemeController {
private readonly userService: UserService,
) { }

private async basicProps() {}
private async basicProps() {
return {
site: {
posts: await this.postService.model.find(),
pages: await this.pageService.model.find(),
categories: await this.categoryService.model.find({
type: CategoryType.Category
}),
tags: await this.categoryService.model.find({
type: CategoryType.Tag
}),
},
configs: {
urls: await this.configService.get("urls"),
site: await this.configService.get("site"),
theme: await this.configService.get("theme"),
},
}
}

// ********************************************************
// 以下是管理命令
Expand Down

0 comments on commit 8f23678

Please sign in to comment.