pub mod model;
pub mod provider;

use actix_web::web;
use actix_web::web::ServiceConfig;

pub fn configure(cfg: &mut ServiceConfig) {
    cfg.service(
        web::scope("/ai")
            .service(
                web::resource("/providers")
                    .route(web::get().to(provider::list_providers)),
            )
            .service(
                web::resource("/providers/{id}")
                    .route(web::get().to(provider::get_provider)),
            )
            .service(
                web::resource("/models")
                    .route(web::get().to(model::list_models)),
            )
            .service(
                web::resource("/models/{id}")
                    .route(web::get().to(model::get_model)),
            )
            .service(
                web::resource("/models/{id}/versions")
                    .route(web::get().to(model::list_versions)),
            )
            .service(
                web::resource("/models/{id}/card")
                    .route(web::get().to(model::get_card)),
            )
            .service(
                web::resource("/models/{id}/tags")
                    .route(web::get().to(model::list_tags)),
            )
            .service(
                web::resource("/models/{id}/discussions")
                    .route(web::get().to(model::list_discussions)),
            )
            .service(
                web::resource("/models/{id}/likes")
                    .route(web::get().to(model::list_likes)),
            ),
    );
}
