You've already forked AstralRinth
forked from didirus/AstralRinth
Payments/subscriptions support (#943)
* [wip] Payments/subscriptions support * finish * working payment flow * finish subscriptions, lint, clippy, etc * docker compose
This commit is contained in:
@@ -108,15 +108,13 @@ impl Category {
|
||||
ORDER BY c.ordering, c.category
|
||||
"
|
||||
)
|
||||
.fetch_many(exec)
|
||||
.try_filter_map(|e| async {
|
||||
Ok(e.right().map(|c| Category {
|
||||
id: CategoryId(c.id),
|
||||
category: c.category,
|
||||
project_type: c.project_type,
|
||||
icon: c.icon,
|
||||
header: c.category_header
|
||||
}))
|
||||
.fetch(exec)
|
||||
.map_ok(|c| Category {
|
||||
id: CategoryId(c.id),
|
||||
category: c.category,
|
||||
project_type: c.project_type,
|
||||
icon: c.icon,
|
||||
header: c.category_header
|
||||
})
|
||||
.try_collect::<Vec<Category>>()
|
||||
.await?;
|
||||
@@ -166,13 +164,11 @@ impl LinkPlatform {
|
||||
SELECT id, name, donation FROM link_platforms
|
||||
"
|
||||
)
|
||||
.fetch_many(exec)
|
||||
.try_filter_map(|e| async {
|
||||
Ok(e.right().map(|c| LinkPlatform {
|
||||
id: LinkPlatformId(c.id),
|
||||
name: c.name,
|
||||
donation: c.donation,
|
||||
}))
|
||||
.fetch(exec)
|
||||
.map_ok(|c| LinkPlatform {
|
||||
id: LinkPlatformId(c.id),
|
||||
name: c.name,
|
||||
donation: c.donation,
|
||||
})
|
||||
.try_collect::<Vec<LinkPlatform>>()
|
||||
.await?;
|
||||
@@ -222,8 +218,8 @@ impl ReportType {
|
||||
SELECT name FROM report_types
|
||||
"
|
||||
)
|
||||
.fetch_many(exec)
|
||||
.try_filter_map(|e| async { Ok(e.right().map(|c| c.name)) })
|
||||
.fetch(exec)
|
||||
.map_ok(|c| c.name)
|
||||
.try_collect::<Vec<String>>()
|
||||
.await?;
|
||||
|
||||
@@ -272,8 +268,8 @@ impl ProjectType {
|
||||
SELECT name FROM project_types
|
||||
"
|
||||
)
|
||||
.fetch_many(exec)
|
||||
.try_filter_map(|e| async { Ok(e.right().map(|c| c.name)) })
|
||||
.fetch(exec)
|
||||
.map_ok(|c| c.name)
|
||||
.try_collect::<Vec<String>>()
|
||||
.await?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user