Convert billing to 1-to-100 credits
This commit is contained in:
+3
-3
@@ -136,7 +136,7 @@ function registerUserRoutes(router) {
|
||||
CASE
|
||||
WHEN billing_refunded = 1 THEN 0
|
||||
WHEN cost_cents > 0 THEN cost_cents
|
||||
WHEN status = 'completed' AND type = 'image' THEN 20
|
||||
WHEN status = 'completed' AND type = 'image' THEN 2000
|
||||
WHEN status = 'completed' AND type = 'video' THEN 500
|
||||
ELSE 0
|
||||
END
|
||||
@@ -162,7 +162,7 @@ function registerUserRoutes(router) {
|
||||
resolution = params.resolution || params.quality || params.ratio || null;
|
||||
if (row.status === "completed") {
|
||||
if (row.type === "image") {
|
||||
estimatedCents = 20;
|
||||
estimatedCents = 2000;
|
||||
} else if (row.type === "video") {
|
||||
const dur = params.duration || 5;
|
||||
const res = String(params.resolution || params.quality || "").toUpperCase();
|
||||
@@ -209,7 +209,7 @@ function registerUserRoutes(router) {
|
||||
CASE
|
||||
WHEN billing_refunded = 1 THEN 0
|
||||
WHEN cost_cents > 0 THEN cost_cents
|
||||
WHEN status = 'completed' AND type = 'image' THEN 20
|
||||
WHEN status = 'completed' AND type = 'image' THEN 2000
|
||||
WHEN status = 'completed' AND type = 'video' THEN 500
|
||||
ELSE 0
|
||||
END
|
||||
|
||||
Reference in New Issue
Block a user