Commit 6cfe4028 authored by nextime's avatar nextime

fix res api for autodetection

parent 798adf6c
......@@ -15,4 +15,5 @@ user = user
none = Nessuna Sezione
phone = telefono
index = Home
gate = cancelli
......@@ -313,35 +313,35 @@ class BoardRest(RestCore):
def boardlist(self, request, *a, **kw):
return 'boardlist'
@route("/autodetect")
@wrapResponse
def boardAutodetect(self, request, *a, **kw):
self.core.startAutoDetection()
ResponseConversion(request, entity='OK')
@route("/forceautodetect")
@wrapResponse
def boardForceAutodetect(self, request, *a, **kw):
self.core.startAutoDetection(True)
ResponseConversion(request, entity='OK')
return ResponseConversion(request, entity='OK')
@route("/autodetect")
@wrapResponse
def boardAutodetect(self, request, *a, **kw):
self.core.startAutoDetection()
return ResponseConversion(request, entity='OK')
@route("/syncall")
@wrapResponse
def boardForceAutodetect(self, request, *a, **kw):
def boardSyncAll(self, request, *a, **kw):
self.core.startSync()
ResponseConversion(request, entity='OK')
return ResponseConversion(request, entity='OK')
@route("/syncboardbyid/<int:boardid>")
@wrapResponse
def syncBoardById(self, request, boardid):
self.core.startSync(boardid)
ResponseConversion(request, entity='OK')
return ResponseConversion(request, entity='OK')
@route("/pushboardbyid/<int:boardid>")
@wrapResponse
def pushBoardById(self, request, boardid):
self.core.startPush(boardid)
ResponseConversion(request, entity='OK')
return ResponseConversion(request, entity='OK')
class CronRest(RestCore):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment