Skip to content

Commit e87864b

Browse files
committed
Add config&favorite config
1 parent 283bb17 commit e87864b

File tree

18 files changed

+269
-92
lines changed

18 files changed

+269
-92
lines changed

.env

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,7 @@ LL_HTTP_PORT=8765
55
LL_HTTP_WORKERS=1
66
LL_M_USER="liuli"
77
LL_M_PASS="liuli"
8-
LL_M_HOST="liuli_mongodb"
8+
LL_M_HOST="192.168.1.50"
99
LL_M_PORT="27027"
1010
LL_M_DB="admin"
1111
LL_M_OP_DB="liuli"
12-
LL_DOMAIN=""
13-
LL_DD_TOKEN=""
14-
LL_WECOM_ID=""
15-
LL_WECOM_AGENT_ID="-1"
16-
LL_WECOM_SECRET=""
17-
LL_WECOM_TO_USER=""
18-
LL_WECOM_PARTY=""
19-
LL_TG_CHAT_ID=""
20-
LL_TG_TOKEN=""
21-
LL_BARK_URL=""
22-
LL_GITHUB_TOKEN=""
23-
LL_GITHUB_REPO=""
24-
LL_GITHUB_DOMAIN=""

.vscode/settings.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
"editor.codeActionsOnSave": {
44
"source.organizeImports": true
55
},
6-
"python.formatting.provider": "black",
6+
"python.formatting.provider": "none",
77
"python.linting.pylintEnabled": true,
88
"python.testing.pytestEnabled": true,
99
"python.envFile": "${workspaceFolder}/.env",
1010
"isort.args": ["--settings-path", "${workspaceFolder}/setup.cfg"],
11-
"python.linting.enabled": true
11+
"python.linting.enabled": true,
12+
"[python]": {
13+
"editor.defaultFormatter": "ms-python.black-formatter"
14+
}
1215
}

src/api/views/api/articles/fuzzy_search.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,24 @@
33
Description: 文档模糊搜索接口
44
Changelog: all notable changes to this file will be documented
55
"""
6+
7+
from flask import current_app, request
8+
9+
from src.api.common import (
10+
ResponseCode,
11+
ResponseField,
12+
ResponseReply,
13+
UniResponse,
14+
jwt_required,
15+
response_handle,
16+
)
17+
from src.databases import MongodbBase, mongodb_find
18+
from src.utils.tools import text_decompress
19+
20+
21+
@jwt_required()
22+
def articles_fuzzy_search():
23+
"""
24+
文档模糊搜索接口
25+
"""
26+
pass
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""
2+
Created by howie.hu at 2023-05-09.
3+
Description: 用户配置相关接口
4+
Changelog: all notable changes to this file will be documented
5+
"""
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919

2020

2121
@jwt_required()
22-
def user_delete_config():
22+
def config_delete():
2323
"""
24-
获取 config 列表
24+
删除 config
2525
eg:
2626
{
2727
"username": "liuli",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222

2323
@jwt_required()
24-
def user_get_config():
24+
def config_get():
2525
"""
2626
获取 config 列表
2727
eg:
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
"""
2+
Created by howie.hu at 2023-05-09.
3+
Description: 获取当前内存配置
4+
Changelog: all notable changes to this file will be documented
5+
"""
6+
7+
import json
8+
9+
from bson import json_util
10+
from flask import current_app, request
11+
12+
from src.api.common import (
13+
ResponseCode,
14+
ResponseField,
15+
ResponseReply,
16+
UniResponse,
17+
jwt_required,
18+
response_handle,
19+
)
20+
from src.databases import MongodbBase, mongodb_find
21+
22+
23+
@jwt_required()
24+
def config_get_mem():
25+
"""
26+
获取当前内存配置
27+
eg:
28+
{
29+
"username": "liuli"
30+
}
31+
"""
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
"""
2+
Created by howie.hu at 2023-05-09.
3+
Description: 刷新当前内存配置
4+
Changelog: all notable changes to this file will be documented
5+
"""
6+
7+
import json
8+
9+
from bson import json_util
10+
from flask import current_app, request
11+
12+
from src.api.common import (
13+
ResponseCode,
14+
ResponseField,
15+
ResponseReply,
16+
UniResponse,
17+
jwt_required,
18+
response_handle,
19+
)
20+
from src.databases import MongodbBase, mongodb_find
21+
22+
23+
@jwt_required()
24+
def config_refresh_mem():
25+
"""
26+
刷新当前内存配置
27+
eg:
28+
{
29+
"username": "liuli"
30+
}
31+
"""
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
Changelog: all notable changes to this file will be documented
55
"""
66

7-
from bson import ObjectId
87
from flask import current_app, request
98

109
from src.api.common import (
@@ -19,7 +18,7 @@
1918

2019

2120
@jwt_required()
22-
def user_update_config():
21+
def config_update():
2322
"""
2423
获取 config 列表
2524
eg:
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""
2+
Created by howie.hu at 2023-05-09.
3+
Description: 收藏模块接口
4+
Changelog: all notable changes to this file will be documented
5+
"""

0 commit comments

Comments
 (0)