admin/credit: don't credit unprovisioned subscriptions (#4594)

* Remove pointless sorting

* Filter subscriptions by labrinth's provisioned state
This commit is contained in:
François-Xavier Talbot
2025-10-20 21:31:20 +01:00
committed by GitHub
parent eeed4e572d
commit c379e4b173
2 changed files with 35 additions and 28 deletions

View File

@@ -76,14 +76,14 @@ impl ArchonClient {
pub async fn get_servers_by_hostname(
&self,
hostname: &str,
) -> Result<Vec<String>, reqwest::Error> {
) -> Result<Vec<Uuid>, reqwest::Error> {
#[derive(Deserialize)]
struct NodeByHostnameResponse {
servers: Vec<NodeServerEntry>,
}
#[derive(Deserialize)]
struct NodeServerEntry {
id: String,
id: Uuid,
#[allow(dead_code)]
available: Option<bool>,
}
@@ -106,10 +106,10 @@ impl ArchonClient {
pub async fn get_active_servers_by_region(
&self,
region: &str,
) -> Result<Vec<String>, reqwest::Error> {
) -> Result<Vec<Uuid>, reqwest::Error> {
#[derive(Deserialize)]
struct RegionResponse {
active_servers: Vec<String>,
active_servers: Vec<Uuid>,
}
let res = self