mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-14 09:16:11 +01:00
add logging to api
This commit is contained in:
@@ -61,6 +61,9 @@ def createWebsite(request):
|
|||||||
adminUser = data['adminUser']
|
adminUser = data['adminUser']
|
||||||
admin = Administrator.objects.get(userName=adminUser)
|
admin = Administrator.objects.get(userName=adminUser)
|
||||||
|
|
||||||
|
if os.path.exists(ProcessUtilities.debugPath):
|
||||||
|
logging.writeToFile(f'Create website payload in API {str(data)}')
|
||||||
|
|
||||||
if admin.api == 0:
|
if admin.api == 0:
|
||||||
data_ret = {"existsStatus": 0, 'createWebSiteStatus': 0,
|
data_ret = {"existsStatus": 0, 'createWebSiteStatus': 0,
|
||||||
'error_message': "API Access Disabled."}
|
'error_message': "API Access Disabled."}
|
||||||
|
|||||||
Reference in New Issue
Block a user