mirror of
https://github.com/speatzle/nfsense.git
synced 2025-05-10 18:38:22 +00:00
split up system api module
This commit is contained in:
parent
6cecae76dc
commit
7449bade91
2 changed files with 13 additions and 2 deletions
12
src/api/system/mod.rs
Normal file
12
src/api/system/mod.rs
Normal file
|
@ -0,0 +1,12 @@
|
|||
use crate::state::RpcState;
|
||||
use jsonrpsee::RpcModule;
|
||||
|
||||
mod power;
|
||||
mod service;
|
||||
mod user;
|
||||
|
||||
pub fn register_methods(module: &mut RpcModule<RpcState>) {
|
||||
power::register_methods(module);
|
||||
user::register_methods(module);
|
||||
service::register_methods(module);
|
||||
}
|
|
@ -6,13 +6,12 @@ use jsonrpsee::RpcModule;
|
|||
use pwhash::sha512_crypt;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::api::ApiError;
|
||||
use ApiError::ConfigError;
|
||||
use ApiError::HashError;
|
||||
use ApiError::NotFound;
|
||||
use ApiError::ParameterDeserialize;
|
||||
|
||||
use super::ApiError;
|
||||
|
||||
const USER_CHANGE_PATH: &str = "system.user";
|
||||
|
||||
pub fn register_methods(module: &mut RpcModule<RpcState>) {
|
Loading…
Add table
Reference in a new issue