fix: removed unneeded api, and fixed data comparision bug

This commit is contained in:
guarzo
2025-07-17 15:25:06 +00:00
parent e94de8e629
commit ecd626f105
5 changed files with 5 additions and 43 deletions
+1 -17
View File
@@ -3,29 +3,13 @@ defmodule WandererApp.Api.MapTransaction do
use Ash.Resource,
domain: WandererApp.Api,
data_layer: AshPostgres.DataLayer,
extensions: [AshJsonApi.Resource]
data_layer: AshPostgres.DataLayer
postgres do
repo(WandererApp.Repo)
table("map_transactions_v1")
end
json_api do
type "map_transactions"
includes([:map])
derive_filter?(true)
derive_sort?(true)
routes do
base("/map_transactions")
get(:read)
index :read
end
end
code_interface do
define(:by_id,
get_by: [:id],
+1 -18
View File
@@ -3,30 +3,13 @@ defmodule WandererApp.Api.UserTransaction do
use Ash.Resource,
domain: WandererApp.Api,
data_layer: AshPostgres.DataLayer,
extensions: [AshJsonApi.Resource]
data_layer: AshPostgres.DataLayer
postgres do
repo(WandererApp.Repo)
table("user_transaction_v1")
end
json_api do
type "user_transactions"
# Handle composite primary key
primary_key do
keys([:id])
end
routes do
base("/user_transactions")
get(:read)
index :read
end
end
code_interface do
define(:new, action: :new)
end
+2 -1
View File
@@ -789,7 +789,8 @@ defmodule WandererApp.Esi.ApiClient do
scopes
) do
# Log token refresh success with timing info
time_since_expiry = DateTime.diff(DateTime.utc_now(), expires_at, :second)
expires_at_datetime = DateTime.from_unix!(expires_at)
time_since_expiry = DateTime.diff(DateTime.utc_now(), expires_at_datetime, :second)
Logger.info("TOKEN_REFRESH_SUCCESS: Character token refreshed successfully",
character_id: character_id,
-4
View File
@@ -68,13 +68,11 @@ defmodule WandererAppWeb.OpenApiV1Spec do
%{"name" => "Map System Comments", "description" => "System comments"},
%{"name" => "Map Character Settings", "description" => "Character map settings"},
%{"name" => "Map User Settings", "description" => "User map preferences"},
%{"name" => "Map Transactions", "description" => "Map transaction history"},
%{"name" => "Map Subscriptions", "description" => "Map subscription management"},
%{"name" => "Map Access Lists", "description" => "Map-specific ACLs"},
%{"name" => "Map States", "description" => "Map state information"},
%{"name" => "Users", "description" => "User management"},
%{"name" => "User Activities", "description" => "User activity tracking"},
%{"name" => "User Transactions", "description" => "User transaction history"},
%{"name" => "Ship Type Info", "description" => "Ship type information"}
]
end
@@ -94,13 +92,11 @@ defmodule WandererAppWeb.OpenApiV1Spec do
{"map_system_comments", "Map System Comments"},
{"map_character_settings", "Map Character Settings"},
{"map_user_settings", "Map User Settings"},
{"map_transactions", "Map Transactions"},
{"map_subscriptions", "Map Subscriptions"},
{"map_access_lists", "Map Access Lists"},
{"map_states", "Map States"},
{"users", "Users"},
{"user_activities", "User Activities"},
{"user_transactions", "User Transactions"},
{"ship_type_infos", "Ship Type Info"}
]
+1 -3
View File
@@ -115,7 +115,7 @@ Flexible sorting with offset-based pagination (available on select resources):
# Sort by creation date (newest first) then by name
GET /api/v1/maps?sort=-inserted_at,name
# Offset-based pagination (available on map_systems, map_system_signatures, user_activities, map_transactions)
# Offset-based pagination (available on map_systems, map_system_signatures, user_activities)
GET /api/v1/map_systems?page[limit]=100&page[offset]=0
# Combined filtering, sorting, and pagination
@@ -153,7 +153,6 @@ The API v1 provides access to over 25 resources through the Ash Framework. Here
- **Map Connections** (`/api/v1/map_connections`) - Wormhole connections
- **Map Signatures** (`/api/v1/map_system_signatures`) - Signature scanning data (GET, DELETE only)
- **Map Structures** (`/api/v1/map_system_structures`) - Structure information
- **Map Transactions** (`/api/v1/map_transactions`) - Transaction history (GET only)
- **Map Subscriptions** (`/api/v1/map_subscriptions`) - Subscription management (GET only)
- **Map Systems and Connections** (`/api/v1/maps/{map_id}/systems_and_connections`) - Combined endpoint (GET only)
@@ -162,7 +161,6 @@ The API v1 provides access to over 25 resources through the Ash Framework. Here
### User Resources
- **User Activities** (`/api/v1/user_activities`) - User activity tracking (GET only)
- **User Transactions** (`/api/v1/user_transactions`) - User transaction history (GET only)
- **Map Character Settings** (`/api/v1/map_character_settings`) - Character preferences (GET only)
- **Map User Settings** (`/api/v1/map_user_settings`) - User map preferences (GET only)