import { Controller, Get } from "@nestjs/common";
import { ModuleAccessAllowed } from "src/common/decorators/modules-guard.decorators";
import { HomePageService } from "src/identity-and-account/help/help-page.service";
import { Modules as ModulesEnum } from "prisma/postgres/generated/prisma/client/postgres/client";
import { Access } from "src/common/decorators/module-access.decorators";

@Controller()
export class HomePageController {
    constructor(private readonly homePageService: HomePageService) { }

    @Get('help')
    @ModuleAccessAllowed(ModulesEnum.dashboard)
    async getIntroductionHelper(@Access('email') email: string) {
        return await this.homePageService.buildHomePageHelpMessage(email);
    }
}