mirror of
https://gitee.com/dromara/Jpom.git
synced 2024-12-02 11:58:01 +08:00
调整
This commit is contained in:
parent
63ba8e9180
commit
556a10bae7
@ -175,6 +175,8 @@ Agent.sh status 查看Jpom插件端运行状态
|
|||||||
|
|
||||||
[https://jpom-site.keepbx.cn/docs/#/FQA/FQA](https://jpom-site.keepbx.cn/docs/#/FQA/FQA)
|
[https://jpom-site.keepbx.cn/docs/#/FQA/FQA](https://jpom-site.keepbx.cn/docs/#/FQA/FQA)
|
||||||
|
|
||||||
|
[Jpom 插件开发](https://gitee.com/keepbx/Jpom-Plugin)
|
||||||
|
|
||||||
### 交流讨论 、提供bug反馈或建议
|
### 交流讨论 、提供bug反馈或建议
|
||||||
|
|
||||||
1. QQ群:[136715345](https://shang.qq.com/wpa/qunwpa?idkey=93ff8d8a37a436b752fe38d32075bb1b32a8e0b3d3ff19d0b541ca840433f561)
|
1. QQ群:[136715345](https://shang.qq.com/wpa/qunwpa?idkey=93ff8d8a37a436b752fe38d32075bb1b32a8e0b3d3ff19d0b541ca840433f561)
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
END = b'OK\n'
|
|
||||||
ERROR_END = b'EROOR\n'
|
|
||||||
OK = '200 OK'
|
OK = '200 OK'
|
||||||
Headers = [('Content-type', 'text/plain')]
|
FOUND = '302 FOUND'
|
||||||
|
TEXT_HEADER = [('Content-type', 'text/plain')]
|
||||||
|
|
||||||
|
|
||||||
def handler(environ, start_response):
|
def handler(environ, start_response):
|
||||||
@ -13,8 +12,8 @@ def handler(environ, start_response):
|
|||||||
json = result.json()
|
json = result.json()
|
||||||
tag_name = json['tag_name']
|
tag_name = json['tag_name']
|
||||||
if tag_name.strip() == '':
|
if tag_name.strip() == '':
|
||||||
start_response(OK, Headers)
|
start_response(OK, TEXT_HEADER)
|
||||||
return [ERROR_END]
|
return [bytes('没有tagName', encoding="utf8")]
|
||||||
tag_name = tag_name.replace('v', '')
|
tag_name = tag_name.replace('v', '')
|
||||||
# 处理请求参数
|
# 处理请求参数
|
||||||
try:
|
try:
|
||||||
@ -28,5 +27,5 @@ def handler(environ, start_response):
|
|||||||
type = par.strip().split("=")[1]
|
type = par.strip().split("=")[1]
|
||||||
# 重定向到下载地址
|
# 重定向到下载地址
|
||||||
url = "https://jpom-releases.oss-cn-hangzhou.aliyuncs.com/" + type.lower() + "-" + tag_name + "-release.zip"
|
url = "https://jpom-releases.oss-cn-hangzhou.aliyuncs.com/" + type.lower() + "-" + tag_name + "-release.zip"
|
||||||
start_response('302 FOUND', [('Location', url)])
|
start_response(FOUND, [('Location', url)])
|
||||||
return [END]
|
return [bytes(url, encoding="utf8")]
|
||||||
|
Loading…
Reference in New Issue
Block a user