예제 #1
0
    def next(self, request, pk=None):
        game = Game.objects.get(pk=pk)

        chess = Chess(game.data)

        chess.next()

        # update db with new board
        game.data = chess.export()
        game.save()
        return Response("success, time to refresh")