Update app.py

pull/3/head
malaohu 2021-03-28 21:54:01 +08:00 committed by GitHub
parent 6450033999
commit d564354f82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

4
app.py
View File

@ -105,10 +105,12 @@ def GenerateLicense(Type : LicenseType, Count : int, UserName : str, MajorVersio
def get_lc():
name = request.args.get('name', '')
version = request.args.get('ver', '')
count = int(request.args.get('count', '1'))
MajorVersion, MinorVersion = version.split('.')[0:2]
MajorVersion = int(MajorVersion)
MinorVersion = int(MinorVersion)
lc = GenerateLicense(LicenseType.Professional, 1, name, MajorVersion, MinorVersion)
lc = GenerateLicense(LicenseType.Professional, count, name, MajorVersion, MinorVersion)
return lc