Browse Source

callback template implementaion

Hal De 4 năm trước cách đây
mục cha
commit
ca564fffc7
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      app/app.py

+ 2 - 2
app/app.py

@@ -138,7 +138,7 @@ async def reloadCallback(mngr: Manager, msg: Message):
   await refreshStatesCache()
   await refreshQueuesCache()
   await rebindLostDevices()
-  await db.execute(query='CREATE TABLE IF NOT EXISTS callback_urls (device VARCHAR(16) PRIMARY KEY, url VARCHAR(255))')
+  # await db.execute(query='CREATE TABLE IF NOT EXISTS callback_urls (device VARCHAR(16) PRIMARY KEY, url VARCHAR(255))')
 
 @manager.register_event('ExtensionStatus')
 async def extensionStatusCallback(mngr: Manager, msg: Message):
@@ -289,8 +289,8 @@ async def amiGetVar(variable):
   app.logger.warning('GetVar({})->{}'.format(variable, reply.value))
   return reply.value
 
-@authRequired
 @app.route('/ami/auths')
+@authRequired
 async def amiPJSIPShowAuths():
   if not request.admin:
     abort(401)