]> git.proxmox.com Git - proxmox-backup.git/blame - src/api2/subscription.rs
tree-wide: use 'dyn' for all trait objects
[proxmox-backup.git] / src / api2 / subscription.rs
CommitLineData
7e13b2d6
DM
1use failure::*;
2
3use crate::tools;
ef2f2efb 4use crate::api_schema::*;
dc9a007b 5use crate::api_schema::router::*;
7e13b2d6
DM
6use serde_json::{json, Value};
7
8
6049b71f
DM
9fn get_subscription(
10 _param: Value,
11 _info: &ApiMethod,
dd5495d6 12 _rpcenv: &mut dyn RpcEnvironment,
6049b71f 13) -> Result<Value, Error> {
7e13b2d6
DM
14
15 let url = "https://www.proxmox.com/en/proxmox-backup-server/pricing";
16 Ok(json!({
17 "status": "NotFound",
18 "message": "There is no subscription key",
19 "serverid": tools::get_hardware_address()?,
20 "url": url,
21 }))
22}
23
24pub fn router() -> Router {
25
26 let route = Router::new()
27 .get(ApiMethod::new(
28 get_subscription,
29 ObjectSchema::new("Read subscription info.")));
30
31 route
32}