Archived
feat: upload
This commit is contained in:
6 files changed
+16
-6
No files matched your search
@@ -9,7 +9,7 @@
|
||||
# 计数器
|
||||
灵感: https://github.com/journey-ad/Moe-counter
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||
|
||||
|
||||
Binary file not shown.
@@ -97,8 +97,10 @@ def arg_not_be_full() -> Response:
|
||||
参数不完整
|
||||
:return:
|
||||
"""
|
||||
response = make_response('<h2 style="text-align: center">参数填写不完整 -> name</h2>')
|
||||
response = make_response({'code': 200,
|
||||
'message': 'Incomplete parameters'})
|
||||
response.status_code = 200
|
||||
response.headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
return response
|
||||
|
||||
|
||||
@@ -109,7 +111,15 @@ def api_page() -> Response or str:
|
||||
:return:
|
||||
"""
|
||||
if 'name' in request.args:
|
||||
return build_page(request.args['name'])
|
||||
name = request.args['name']
|
||||
if name != '':
|
||||
resp = build_page(name)
|
||||
response = make_response(resp)
|
||||
response.headers['Content-Type'] = 'image/svg+xml; charset=utf-8'
|
||||
return response
|
||||
|
||||
else:
|
||||
return arg_not_be_full()
|
||||
else:
|
||||
return arg_not_be_full()
|
||||
|
||||
|
||||
Binary file not shown.
+1
-1
@@ -1 +1 @@
|
||||
{"MarkusJoe": 26, "Mar": 3, "M": 1, "": 5, "oo": 20}
|
||||
{"MarkusJoe": 27, "Mar": 4, "M": 2, "": 23, "oo": 103, "sdhi": 8, "sdsdsdsdsdsdawioruvniovenyrui": 0, "rui": 11, "ru": 0, "r": 0, "rr": 0, "Ma": 0, "Mark": 0, "Marku": 0, "Markus": 0, "MarkusK": 0, "MarkusKe": 0, "MarkusJ": 0, "MarkusJo": 0}
|
||||
+2
-2
@@ -15,9 +15,9 @@
|
||||
<br>
|
||||
<i>本服务使用Python-Flask开发(Flask 官方地址:<a href="https://flask.palletsprojects.com/en/2.0.x/">Flask</a> )</i>
|
||||
<br>
|
||||
<i>调用示例: <a href="http://127.0.0.1:5000/API?owner=main">127.0.0.1:5000/API>owner=main</a> 注: 调用只能使用GET方法请求</i>
|
||||
<i>调用示例: <a href="http://127.0.0.1:5000/API?name=main">127.0.0.1:5000/API?name=main</a> 注: 调用支持POST 和 GET 方法请求</i>
|
||||
<br>
|
||||
<i>已经搭建好的私人服务器调用地址:<a href="http://36.134.138.141:5000/API?owner=main"></a></i>
|
||||
<i>已经搭建好的私人服务器调用地址:<a href="http://geminitay.pythonanywhere.com/API?name=main"></a></i>
|
||||
<br>
|
||||
<i>数字图片作者: <a href="https://www.iconfont.cn/user/detail?uid=363&nid=8RbLpoB8S23K">碎蜂</a></i>
|
||||
<br>
|
||||
|
||||
Reference in New Issue
Block a user