From 6b251b58611cc6806517647e0ff71489d137d4ea Mon Sep 17 00:00:00 2001 From: Tom Konidas Date: Mon, 16 Sep 2024 18:49:19 -0400 Subject: [PATCH] Add updated_at to app JSON object --- lib/plexus_web/controllers/api/v1/app_json.ex | 3 ++- lib/plexus_web/controllers/api/v1/schemas/app.ex | 1 + lib/plexus_web/controllers/api/v1/schemas/app_response.ex | 1 + lib/plexus_web/controllers/api/v1/schemas/apps_response.ex | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/plexus_web/controllers/api/v1/app_json.ex b/lib/plexus_web/controllers/api/v1/app_json.ex index 290c079c..b964387e 100644 --- a/lib/plexus_web/controllers/api/v1/app_json.ex +++ b/lib/plexus_web/controllers/api/v1/app_json.ex @@ -19,7 +19,8 @@ defmodule PlexusWeb.API.V1.AppJSON do %{ package: app.package, name: app.name, - icon_url: app.icon_url + icon_url: app.icon_url, + updated_at: DateTime.truncate(app.updated_at, :second) } |> merge_scores(app.scores) end diff --git a/lib/plexus_web/controllers/api/v1/schemas/app.ex b/lib/plexus_web/controllers/api/v1/schemas/app.ex index 8cbfb146..5e900681 100644 --- a/lib/plexus_web/controllers/api/v1/schemas/app.ex +++ b/lib/plexus_web/controllers/api/v1/schemas/app.ex @@ -16,6 +16,7 @@ defmodule PlexusWeb.API.V1.Schemas.App do example: %{ "name" => "Signal", "package" => "org.thoughtcrime.securesms", + "updated_at" => "2024-04-30T22:41:19Z", "scores" => %{ "native" => %{ "rating_type" => "native", diff --git a/lib/plexus_web/controllers/api/v1/schemas/app_response.ex b/lib/plexus_web/controllers/api/v1/schemas/app_response.ex index 07164c61..c0aefbdc 100644 --- a/lib/plexus_web/controllers/api/v1/schemas/app_response.ex +++ b/lib/plexus_web/controllers/api/v1/schemas/app_response.ex @@ -14,6 +14,7 @@ defmodule PlexusWeb.API.V1.Schemas.AppResponse do %{ "name" => "Signal", "package" => "org.thoughtcrime.securesms", + "updated_at" => "2024-04-30T22:41:19Z", "scores" => %{ "native" => %{ "rating_type" => "native", diff --git a/lib/plexus_web/controllers/api/v1/schemas/apps_response.ex b/lib/plexus_web/controllers/api/v1/schemas/apps_response.ex index 6e6777f2..b943b09b 100644 --- a/lib/plexus_web/controllers/api/v1/schemas/apps_response.ex +++ b/lib/plexus_web/controllers/api/v1/schemas/apps_response.ex @@ -17,6 +17,7 @@ defmodule PlexusWeb.API.V1.Schemas.AppsResponse do %{ "name" => "Signal", "package" => "org.thoughtcrime.securesms", + "updated_at" => "2024-04-30T22:41:19Z", "scores" => %{ "native" => %{ "rating_type" => "native",