diff --git a/docs/api.md b/docs/api.md index 18608a18..22c84b78 100644 --- a/docs/api.md +++ b/docs/api.md @@ -343,18 +343,18 @@ Examples: * get program from current day ```BASH -curl -X GET http://127.0.0.1:8787/program/1/ -H 'Authorization: Bearer ' +curl -X GET http://127.0.0.1:8787/api/program/1/ -H 'Authorization: Bearer ' ``` * get a program range between two dates ```BASH -curl -X GET http://127.0.0.1:8787/program/1/?start_after=2022-11-13T12:00:00&start_before=2022-11-20T11:59:59 \ +curl -X GET http://127.0.0.1:8787/api/program/1/?start_after=2022-11-13T12:00:00&start_before=2022-11-20T11:59:59 \ -H 'Authorization: Bearer ' ``` * get program from give day ```BASH -curl -X GET http://127.0.0.1:8787/program/1/?start_after=2022-11-13T10:00:00 \ +curl -X GET http://127.0.0.1:8787/api/program/1/?start_after=2022-11-13T10:00:00 \ -H 'Authorization: Bearer ' ``` diff --git a/ffplayout-api/src/api/routes.rs b/ffplayout-api/src/api/routes.rs index a8b37762..1690f7e6 100644 --- a/ffplayout-api/src/api/routes.rs +++ b/ffplayout-api/src/api/routes.rs @@ -856,18 +856,18 @@ async fn import_playlist( /// /// * get program from current day /// ```BASH -/// curl -X GET http://127.0.0.1:8787/program/1/ -H 'Authorization: Bearer ' +/// curl -X GET http://127.0.0.1:8787/api/program/1/ -H 'Authorization: Bearer ' /// ``` /// /// * get a program range between two dates /// ```BASH -/// curl -X GET http://127.0.0.1:8787/program/1/?start_after=2022-11-13T12:00:00&start_before=2022-11-20T11:59:59 \ +/// curl -X GET http://127.0.0.1:8787/api/program/1/?start_after=2022-11-13T12:00:00&start_before=2022-11-20T11:59:59 \ /// -H 'Authorization: Bearer ' /// ``` /// /// * get program from give day /// ```BASH -/// curl -X GET http://127.0.0.1:8787/program/1/?start_after=2022-11-13T10:00:00 \ +/// curl -X GET http://127.0.0.1:8787/api/program/1/?start_after=2022-11-13T10:00:00 \ /// -H 'Authorization: Bearer ' /// ``` #[get("/program/{id}/")] @@ -876,7 +876,7 @@ async fn get_program( id: web::Path, obj: web::Query, ) -> Result { - let (config, _) = playout_config(&*id).await?; + let (config, _) = playout_config(&id).await?; let start_sec = config.playlist.start_sec.unwrap(); let mut days = 0; let mut program = vec![];