芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/public_html/cloud.pulsehost.co.uk/modules/TwoFactorAuth/js/utils/Api.js
'use strict' const Ajax = require('%PathToCoreWebclientModule%/js/Ajax.js'), App = require('%PathToCoreWebclientModule%/js/App.js') const DeviceUtils = require('modules/%ModuleName%/js/utils/Device.js'), Settings = require('modules/%ModuleName%/js/Settings.js') module.exports = { saveDevice(authToken, callback) { if (!Settings.AllowUsedDevices) { callback() return } const parameters = { DeviceId: App.getCurrentDeviceId(), DeviceName: DeviceUtils.getName(), } Ajax.send('%ModuleName%', 'SetDeviceName', parameters, callback, this, null, authToken) }, }