br-addon 0.2.20

This is an addon
Documentation
use br_fields::Field;
use json::{JsonValue, object};
use br_addon::module::Module;
use br_addon::request::Request;
use br_addon::ApiResponse;


pub struct {{action}} {
    pub module: {{model}},
}

impl Action for {{action}} {
    fn author(&self) -> &'static str {
         ""
    }
    fn title(&self) -> &'static str { "{{title}}" }
    fn interface_type(&self) -> InterfaceType {InterfaceType::BTN}

    fn params(&mut self) -> JsonValue {
        let params = object! {};
        params
    }

    fn index(&mut self, request: Request) -> ApiResponse {
        ApiResponse::success(object! {}, "ok")
    }
}