Skip to content

Commit

Permalink
Merge pull request #195 from Screenly/fix/version_comparison
Browse files Browse the repository at this point in the history
Fix: no entyrpoint in the versions.
  • Loading branch information
korvyashka authored Jul 30, 2024
2 parents 700a139 + e2c9b7e commit 0c3aab1
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions src/commands/edge_app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ pub struct EdgeAppVersion {
#[serde(default)]
pub author: Option<String>,
#[serde(default)]
pub entrypoint: Option<String>,
#[serde(default)]
pub homepage_url: Option<String>,
#[serde(default)]
pub ready_signal: bool,
Expand Down Expand Up @@ -911,7 +909,7 @@ impl EdgeAppCommand {
let response = commands::get(
&self.authentication,
&format!(
"v4.1/edge-apps/versions?select=user_version,description,icon,author,entrypoint,homepage_url,revision,ready_signal&app_id=eq.{}&order=revision.desc&limit=1",
"v4.1/edge-apps/versions?select=user_version,description,icon,author,homepage_url,revision,ready_signal&app_id=eq.{}&order=revision.desc&limit=1",
app_id
),
)?;
Expand Down Expand Up @@ -1311,12 +1309,6 @@ impl EdgeAppCommand {
description: manifest.description.clone(),
icon: manifest.icon.clone(),
author: manifest.author.clone(),
entrypoint: manifest
.entrypoint
.clone()
.and_then(|ep| ep.uri)
.or(Some("index.html".to_owned()))
.clone(),
homepage_url: manifest.homepage_url.clone(),
revision: _version.revision,
}),
Expand Down Expand Up @@ -2409,7 +2401,7 @@ mod tests {
)
.query_param(
"select",
"user_version,description,icon,author,entrypoint,homepage_url,revision,ready_signal",
"user_version,description,icon,author,homepage_url,revision,ready_signal",
)
.query_param("app_id", "eq.01H2QZ6Z8WXWNDC0KQ198XCZEW")
.query_param("order", "revision.desc")
Expand All @@ -2420,7 +2412,6 @@ mod tests {
"description": "desc",
"icon": "icon",
"author": "author",
"entrypoint": "entrypoint",
"homepage_url": "homepage_url",
"ready_signal": false,
"revision": 7,
Expand Down Expand Up @@ -2734,7 +2725,7 @@ mod tests {
)
.query_param(
"select",
"user_version,description,icon,author,entrypoint,homepage_url,revision,ready_signal"
"user_version,description,icon,author,homepage_url,revision,ready_signal"
)
.query_param("app_id", "eq.01H2QZ6Z8WXWNDC0KQ198XCZEW")
.query_param("order", "revision.desc")
Expand All @@ -2745,7 +2736,6 @@ mod tests {
"description": "asdf",
"icon": "asdf",
"author": "asdf",
"entrypoint": "index.html",
"homepage_url": "asdfasdf",
"ready_signal": false,
"revision": 1
Expand Down Expand Up @@ -2801,7 +2791,7 @@ mod tests {
)
.query_param(
"select",
"user_version,description,icon,author,entrypoint,homepage_url,revision,ready_signal",
"user_version,description,icon,author,homepage_url,revision,ready_signal",
)
.query_param("app_id", "eq.01H2QZ6Z8WXWNDC0KQ198XCZEW")
.query_param("order", "revision.desc")
Expand All @@ -2812,7 +2802,6 @@ mod tests {
"description": "description",
"icon": "another_icon",
"author": "asdf",
"entrypoint": "entrypoint.html",
"homepage_url": "asdfasdf",
"ready_signal": false,
"revision": 1,
Expand Down Expand Up @@ -2868,7 +2857,7 @@ mod tests {
)
.query_param(
"select",
"user_version,description,icon,author,entrypoint,homepage_url,revision,ready_signal",
"user_version,description,icon,author,homepage_url,revision,ready_signal",
)
.query_param("app_id", "eq.01H2QZ6Z8WXWNDC0KQ198XCZEW")
.query_param("order", "revision.desc")
Expand Down

0 comments on commit 0c3aab1

Please sign in to comment.