24 lines
607 B
Python
24 lines
607 B
Python
from libs.api.apiBlueprint import ApiBlueprint
|
|
from libs.app.common.paths import ROOT_DIR
|
|
|
|
from flask import jsonify, request, send_from_directory
|
|
|
|
import os
|
|
import copy
|
|
import random
|
|
|
|
class Blueprint(ApiBlueprint):
|
|
def routes(self):
|
|
from .networks import Networks
|
|
self.module:Networks = self.module
|
|
|
|
@self.blueprint.route('/')
|
|
def show():
|
|
return self.module.name
|
|
|
|
@self.blueprint.route('/networks', methods=["GET"])
|
|
def networks():
|
|
if request.method == "GET":
|
|
return jsonify(self.module.networks)
|
|
|