]>
Commit | Line | Data |
---|---|---|
7e13b2d6 DM |
1 | use failure::*; |
2 | ||
3 | use crate::tools; | |
4 | use crate::api::schema::*; | |
5 | use crate::api::router::*; | |
6 | use serde_json::{json, Value}; | |
7 | ||
8 | ||
6049b71f DM |
9 | fn get_subscription( |
10 | _param: Value, | |
11 | _info: &ApiMethod, | |
12 | _rpcenv: &mut RpcEnvironment, | |
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 | ||
24 | pub 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 | } |