import AdminIndexViewModel from "../models/admin/AdminIndexViewModel"; import AdminPartiesViewModel from "../models/admin/AdminPartiesViewModel"; import AdminUsersViewModel from "../models/admin/AdminUsersViewModel"; import PartyService from "../services/PartyService"; import UserService from "../services/UserService"; import Controller from "./Controller"; export default class AdminController_Auth$Admin extends Controller { public async Index_Get() { const adminIndexViewModel: AdminIndexViewModel = { userCount: await UserService.GetUserCount(), partyCount: await PartyService.GetPartyCount() }; return this.view(adminIndexViewModel); } public async Users_Get() { const adminUsersViewModel: AdminUsersViewModel = { users: await UserService.GetAll() }; return this.view(adminUsersViewModel); } public async Parties_Get() { const adminPartiesViewModel: AdminPartiesViewModel = { parties: await PartyService.GetAll() }; return this.view(adminPartiesViewModel); } }