Add unlock premium API

This commit is contained in:
Jonas Lochmann
2020-01-20 09:19:01 +01:00
parent db9c981521
commit f2c8a3043f
3 changed files with 60 additions and 6 deletions
+8 -1
View File
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 Jonas Lochmann
* Copyright (C) 2019 - 2020 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -50,3 +50,10 @@ const familyIdGenerator = new TokenGenerator({
})
export const generateFamilyId = () => familyIdGenerator.generate()
const purchaseIdGenerator = new TokenGenerator({
length: 10,
chars: 'a-zA-Z0-9'
})
export const generatePurchaseId = () => purchaseIdGenerator.generate()