mirror of
https://github.com/fastogt/fastocloud_admin.git
synced 2025-03-09 23:38:52 +00:00
Exp date
This commit is contained in:
parent
1882f17228
commit
6d5fffa769
3 changed files with 8 additions and 1 deletions
|
@ -1 +1 @@
|
|||
Subproject commit a0377f70b5c1531c7e324bc6cae0878fdd958df3
|
||||
Subproject commit 9094550d62a0968a1114e5ee56de63623f718828
|
|
@ -51,6 +51,9 @@ Activate service | {{ config['PUBLIC_CONFIG'].site.title }}
|
|||
<td>
|
||||
{{ subscriber.created_date }}
|
||||
</td>
|
||||
<td>
|
||||
{{ subscriber.exp_date }}
|
||||
</td>
|
||||
<td>
|
||||
{{ ['NOT_ACTIVE', 'ACTIVE', 'TRIAL_FINISHED', 'BANNED'][subscriber.status] }}
|
||||
</td>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
import argparse
|
||||
import os
|
||||
import sys
|
||||
from datetime import datetime
|
||||
from mongoengine import connect
|
||||
import mysql.connector
|
||||
|
||||
|
@ -54,6 +55,9 @@ if __name__ == '__main__':
|
|||
new_user = SubscriberUser.make_subscriber(email=sql_entry['username'], password=sql_entry['password'],
|
||||
country='US')
|
||||
new_user.status = SubscriberUser.Status.ACTIVE
|
||||
sdate = sql_entry['exp_date']
|
||||
if sdate:
|
||||
new_user.exp_date = datetime.fromtimestamp(sdate)
|
||||
dev = Device(name='Xtream', max_connections=sql_entry['max_connections'])
|
||||
new_user.add_device(dev)
|
||||
# save
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue