mirror of
https://github.com/fosrl/pangolin.git
synced 2026-09-16 15:50:09 +02:00
Add license tiers
This commit is contained in:
@@ -4,7 +4,7 @@ import { setHostMeta } from "@server/lib/hostMeta";
|
||||
const keyTypes = ["host"] as const;
|
||||
export type LicenseKeyType = (typeof keyTypes)[number];
|
||||
|
||||
const keyTiers = ["personal", "enterprise"] as const;
|
||||
const keyTiers = ["personal", "enterprise", "tier1", "tier2"] as const;
|
||||
export type LicenseKeyTier = (typeof keyTiers)[number];
|
||||
|
||||
export type LicenseStatus = {
|
||||
@@ -33,7 +33,7 @@ export type LicenseKeyCache = {
|
||||
export class License {
|
||||
private serverSecret!: string;
|
||||
|
||||
constructor(private hostMeta: HostMeta) { }
|
||||
constructor(private hostMeta: HostMeta) {}
|
||||
|
||||
public async check(): Promise<LicenseStatus> {
|
||||
return {
|
||||
@@ -50,6 +50,10 @@ export class License {
|
||||
public async isUnlocked() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public async hasTier(tier: LicenseKeyTier[]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
await setHostMeta();
|
||||
|
||||
Reference in New Issue
Block a user