Exemplo n.º 1
0
    def remove(self):
        sid = request.form['sid']
        server = ServiceSettings.get_by_id(ObjectId(sid))
        if server:
            current_user.set_current_server_position(0)
            server.delete()
            return jsonify(status='ok'), 200

        return jsonify(status='failed'), 404
Exemplo n.º 2
0
 def change_current_server(self, position):
     if position.isdigit():
         current_user.set_current_server_position(int(position))
     return self.dashboard()