Skip to content

Commit 5cd5ae6

Browse files
committed
feat(chatroom): 为 /gen 路由添加登录检查- 在 ChatroomProcessor 中为 /gen 路由添加了登录检查中间件
- 确保只有登录用户可以访问生成金属的方法
1 parent 3fe4e70 commit 5cd5ae6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/b3log/symphony/processor/ChatroomProcessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ public static void register() {
218218
Dispatcher.get("/chat-room/node/get", chatroomProcessor::getNode, loginCheck::handle);
219219
Dispatcher.post("/chat-room/node/push", chatroomProcessor::nodePush);
220220

221-
Dispatcher.get("/gen", chatroomProcessor::genMetal);
221+
Dispatcher.get("/gen", chatroomProcessor::genMetal, loginCheck::handle);
222222
}
223223

224224
public static Map<String, String> metalCache = Collections.synchronizedMap(new LinkedHashMap<String, String>() {

0 commit comments

Comments
 (0)