]> git.proxmox.com Git - proxmox-backup.git/blob - src/api2/subscription.rs
b0a2e97f1a7e3b2e88fd3e130784384153c15366
[proxmox-backup.git] / src / api2 / subscription.rs
1 use failure::*;
2
3 use crate::tools;
4 use crate::api_schema::*;
5 use crate::api_schema::router::*;
6 use serde_json::{json, Value};
7
8
9 fn get_subscription(
10 _param: Value,
11 _info: &ApiMethod,
12 _rpcenv: &mut dyn RpcEnvironment,
13 ) -> Result<Value, Error> {
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
24 pub fn router() -> Router {
25 Router::new()
26 .get(ApiMethod::new(
27 get_subscription,
28 ObjectSchema::new("Read subscription info.")))
29 }