Пример #1
0
def unplugDevicePin(pinId):
    updatedPin = dao.updateDevicePinBoardId(pinId, -1)
    return updatedPin
Пример #2
0
def unAttachPiDevicePinToBoard(request, piDevicePinId):
    updatedPiDevicePin = dao.updateDevicePinBoardId(piDevicePinId, -1)
    updatedPiDevicePin = dao.getPiDevicePinById(piDevicePinId)
    return ResponseProcessor.processSuccessResponse(
        updatedPiDevicePin._convertToDict())
Пример #3
0
def pluginDevicePin(pinId, boardID):
    updatedPin = dao.updateDevicePinBoardId(pinId, boardID)
    return updatedPin
Пример #4
0
def attachPiDevicePinToBoard(request, piDevicePinId):
    boardID = request.GET.get('boardId')
    updatedPiDevicePin = dao.updateDevicePinBoardId(piDevicePinId, boardID)
    updatedPiDevicePin = dao.getPiDevicePinById(piDevicePinId)
    return ResponseProcessor.processSuccessResponse(
        updatedPiDevicePin._convertToDict())