Initial open-source self-hosted Songs2YT edition
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import { Plan } from "@prisma/client";
|
||||
|
||||
/** Self-hosted / open-source edition: unlimited quotas and Pro features unlocked. */
|
||||
export function isSelfHostedEdition(): boolean {
|
||||
return process.env.S2YT_EDITION === "selfhosted";
|
||||
}
|
||||
|
||||
/** Pro-gated features (API keys, playlists, etc.) are available. */
|
||||
export function hasProFeatures(plan: Plan): boolean {
|
||||
return isSelfHostedEdition() || plan === "PREMIUM";
|
||||
}
|
||||
Reference in New Issue
Block a user