[improvement][chat]Adopt accept pattern to parsers and executors.
Some checks are pending
supersonic CentOS CI / build (21) (push) Waiting to run
supersonic mac CI / build (21) (push) Waiting to run
supersonic ubuntu CI / build (21) (push) Waiting to run
supersonic windows CI / build (21) (push) Waiting to run

This commit is contained in:
jerryjzhang
2025-03-11 00:27:06 +08:00
parent 93d585c0d5
commit b58e041e8d
12 changed files with 49 additions and 29 deletions

View File

@@ -53,7 +53,7 @@ public class ChatModelController {
@RequestMapping("/getModelList")
public List<ChatModel> getModelList(HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse) {
HttpServletResponse httpServletResponse) {
User user = UserHolder.findUser(httpServletRequest, httpServletResponse);
return chatModelService.getChatModels(user);
}

View File

@@ -96,8 +96,7 @@ public class DatabaseServiceImpl extends ServiceImpl<DatabaseDOMapper, DatabaseD
databaseResp.setHasEditPermission(true);
databaseResp.setHasUsePermission(true);
}
if (databaseResp.getViewers().contains(user.getName())
|| databaseResp.isPublic()) {
if (databaseResp.getViewers().contains(user.getName()) || databaseResp.isPublic()) {
databaseResp.setHasUsePermission(true);
}
});