You've already forked my-video-workflow
添加prod判断
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
from flask import Blueprint, jsonify, request
|
||||
|
||||
from config import get_config, write_config, load_config
|
||||
from config import get_config, write_config, load_config, PROD_ENV
|
||||
|
||||
blueprint = Blueprint("api_config", __name__, url_prefix="/api/config")
|
||||
|
||||
@ -10,6 +10,13 @@ def get_global_config():
|
||||
return jsonify(get_config())
|
||||
|
||||
|
||||
@blueprint.get("/env")
|
||||
def get_current_env():
|
||||
return jsonify({
|
||||
"prod": PROD_ENV
|
||||
})
|
||||
|
||||
|
||||
@blueprint.put("/")
|
||||
def modify_global_config():
|
||||
return jsonify(request.json)
|
||||
|
Reference in New Issue
Block a user