//! {{RESOURCE_NAME}} resource routes
//!
//! Generated by: keg gen api {{RESOURCE_NAME}}

use actix_web::web;

pub fn configure(cfg: &mut web::ServiceConfig) {
    let scope = web::scope("/{{RESOURCE_NAME}}")
        .route("", web::get().to(super::super::super::controller::api::{{RESOURCE_NAME}}::list))
        .route("", web::post().to(super::super::super::controller::api::{{RESOURCE_NAME}}::create))
        .route("/{id}", web::get().to(super::super::super::controller::api::{{RESOURCE_NAME}}::get))
        .route("/{id}", web::put().to(super::super::super::controller::api::{{RESOURCE_NAME}}::update))
        .route("/{id}", web::delete().to(super::super::super::controller::api::{{RESOURCE_NAME}}::delete));

    cfg.service(scope);
}