Simplified defaults data for maintainability
This commit is contained in:
@@ -34,7 +34,6 @@ import subprocess
|
||||
import socket
|
||||
from tornado.web import HTTPError
|
||||
from tornado import gen
|
||||
from pkg_resources import Requirement, resource_filename
|
||||
|
||||
import bbctrl
|
||||
|
||||
@@ -225,13 +224,6 @@ class PasswordHandler(bbctrl.APIHandler):
|
||||
raise HTTPError(401, 'Failed to set password')
|
||||
|
||||
|
||||
class ConfigDefaultsHandler(bbctrl.APIHandler):
|
||||
def get(self):
|
||||
# defaults_path = bbctrl.get_resource("")
|
||||
# defaults_path = resource_filename(Requirement.parse('bbctrl'), 'bbctrl/' + path)
|
||||
# self.write_json(self.get_ctrl().config.load())
|
||||
pass
|
||||
|
||||
class ConfigLoadHandler(bbctrl.APIHandler):
|
||||
def get(self): self.write_json(self.get_ctrl().config.load())
|
||||
|
||||
@@ -529,7 +521,6 @@ class Web(tornado.web.Application):
|
||||
(r'/api/wifi', WifiHandler),
|
||||
(r'/api/remote/username', UsernameHandler),
|
||||
(r'/api/remote/password', PasswordHandler),
|
||||
(r'/api/config/defaults/(.*)', ConfigDefaultsHandler),
|
||||
(r'/api/config/load', ConfigLoadHandler),
|
||||
(r'/api/config/download', ConfigDownloadHandler),
|
||||
(r'/api/config/save', ConfigSaveHandler),
|
||||
|
||||
Reference in New Issue
Block a user