mirror of
https://github.com/Dvorinka/Bookra.git
synced 2026-10-28 15:51:15 +00:00
cleanup
This commit is contained in:
1 parent
48c3e15a38
commit
cf3315e8fc
155 files changed
+70334
-19015
No files matched your search
@@ -0,0 +1,17 @@
|
||||
package shared
|
||||
|
||||
import "strings"
|
||||
|
||||
// NormalizePlanCode canonicalizes plan codes from various sources
|
||||
// (Paddle checkout, webhook payloads, database records) into stable
|
||||
// internal identifiers used across the billing and tenancy domains.
|
||||
func NormalizePlanCode(planCode string) string {
|
||||
switch strings.TrimSpace(planCode) {
|
||||
case "growth":
|
||||
return "pro"
|
||||
case "multi-location":
|
||||
return "business"
|
||||
default:
|
||||
return strings.TrimSpace(planCode)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user