mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-11 13:10:54 +00:00
Merge pull request #1760 from zed-industries/invite-unknown-platform
Include waitlist entries w/ unknown platform when summarizing and sending invites
This commit is contained in:
commit
a4b518ec72
2 changed files with 7 additions and 2 deletions
|
@ -428,7 +428,8 @@ impl Db for PostgresDb {
|
|||
COUNT(*) as count,
|
||||
COALESCE(SUM(CASE WHEN platform_linux THEN 1 ELSE 0 END), 0) as linux_count,
|
||||
COALESCE(SUM(CASE WHEN platform_mac THEN 1 ELSE 0 END), 0) as mac_count,
|
||||
COALESCE(SUM(CASE WHEN platform_windows THEN 1 ELSE 0 END), 0) as windows_count
|
||||
COALESCE(SUM(CASE WHEN platform_windows THEN 1 ELSE 0 END), 0) as windows_count,
|
||||
COALESCE(SUM(CASE WHEN platform_unknown THEN 1 ELSE 0 END), 0) as unknown_count
|
||||
FROM (
|
||||
SELECT *
|
||||
FROM signups
|
||||
|
@ -449,7 +450,7 @@ impl Db for PostgresDb {
|
|||
FROM signups
|
||||
WHERE
|
||||
NOT email_confirmation_sent AND
|
||||
platform_mac
|
||||
(platform_mac OR platform_unknown)
|
||||
LIMIT $1
|
||||
",
|
||||
)
|
||||
|
@ -1720,6 +1721,8 @@ pub struct WaitlistSummary {
|
|||
pub mac_count: i64,
|
||||
#[sqlx(default)]
|
||||
pub windows_count: i64,
|
||||
#[sqlx(default)]
|
||||
pub unknown_count: i64,
|
||||
}
|
||||
|
||||
#[derive(FromRow, PartialEq, Debug, Serialize, Deserialize)]
|
||||
|
|
|
@ -1022,6 +1022,7 @@ async fn test_signups() {
|
|||
mac_count: 8,
|
||||
linux_count: 4,
|
||||
windows_count: 2,
|
||||
unknown_count: 0,
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -1074,6 +1075,7 @@ async fn test_signups() {
|
|||
mac_count: 5,
|
||||
linux_count: 2,
|
||||
windows_count: 1,
|
||||
unknown_count: 0,
|
||||
}
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue