// Copyright (C) 2021  Aravinth Manivannan <realaravinth@batsense.net>
// SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
//
// SPDX-License-Identifier: AGPL-3.0-or-later

use serde::Serialize;

use super::admin::routes::Admin;
use super::bench::routes::Benches;
use super::mcaptcha::routes::Mcaptcha;
use super::meta::routes::Meta;
use super::stats::routes::Stats;

pub const ROUTES: Routes = Routes::new();

#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
pub struct Routes {
    pub admin: Admin,
    pub meta: Meta,
    pub benches: Benches,
    pub mcaptcha: Mcaptcha,
    pub stats: Stats,
}

impl Routes {
    const fn new() -> Routes {
        Routes {
            admin: Admin::new(),
            meta: Meta::new(),
            benches: Benches::new(),
            mcaptcha: Mcaptcha::new(),
            stats: Stats::new(),
        }
    }
}
